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

Module extension.
  Module confidential_transfer.
    Module verify_proof.
      (*
      pub fn verify_configure_account_proof(
          account_info_iter: &mut Iter<'_, AccountInfo<'_>>,
          proof_instruction_offset: i64,
      ) -> Result<PubkeyValidityProofContext, ProgramError> {
          if proof_instruction_offset == 0 {
              // interpret `account_info` as a context state account
              let context_state_account_info = next_account_info(account_info_iter)?;
              check_zk_token_proof_program_account(context_state_account_info.owner)?;
              let context_state_account_data = context_state_account_info.data.borrow();
              let context_state = pod_from_bytes::<ProofContextState<PubkeyValidityProofContext>>(
                  &context_state_account_data,
              )?;
      
              if context_state.proof_type != ProofType::PubkeyValidity.into() {
                  return Err(ProgramError::InvalidInstructionData);
              }
      
              Ok(context_state.proof_context)
          } else {
              // interpret `account_info` as a sysvar
              let sysvar_account_info = next_account_info(account_info_iter)?;
              let zkp_instruction =
                  get_instruction_relative(proof_instruction_offset, sysvar_account_info)?;
              Ok( *decode_proof_instruction_context::<
                  PubkeyValidityData,
                  PubkeyValidityProofContext,
              >(
                  ProofInstruction::VerifyPubkeyValidity, &zkp_instruction
              )?)
          }
      }
      *)
      Definition verify_configure_account_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info_iter; proof_instruction_offset ] =>
          ltac:(M.monadic
            (let account_info_iter := M.alloc (| account_info_iter |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.Pure.eq
                                  (M.read (| proof_instruction_offset |))
                                  (Value.Integer 0)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let context_state_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.path
                                                        "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        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_zk_token_proof_program_account",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| context_state_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.path
                                                      "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ]
                                                ],
                                                "from_residual",
                                                []
                                              |),
                                              [ M.read (| residual |) ]
                                            |)
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Continue",
                                        0
                                      |) in
                                    let val := M.copy (| γ0_0 |) in
                                    val))
                              ]
                            |) in
                          let context_state_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 (| context_state_account_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "data"
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |) in
                          let context_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 "&")
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext"
                                                ]
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_pod::bytemuck::pod_from_bytes",
                                          [
                                            Ty.apply
                                              (Ty.path
                                                "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext"
                                              ]
                                          ]
                                        |),
                                        [
                                          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",
                                                []
                                              |),
                                              [ context_state_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.path
                                                        "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::cmp::PartialEq",
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                              ],
                                              "ne",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| context_state |),
                                                "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                "proof_type"
                                              |);
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::convert::Into",
                                                    Ty.path
                                                      "solana_zk_token_sdk::instruction::ProofType",
                                                    [
                                                      Ty.path
                                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                    ],
                                                    "into",
                                                    []
                                                  |),
                                                  [
                                                    Value.StructTuple
                                                      "solana_zk_token_sdk::instruction::ProofType::PubkeyValidity"
                                                      []
                                                  ]
                                                |)
                                              |)
                                            ]
                                          |)
                                        |)) 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::InvalidInstructionData"
                                                  []
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| context_state |),
                                    "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                    "proof_context"
                                  |)
                                |)
                              ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let sysvar_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.path
                                                        "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let zkp_instruction :=
                            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::instruction::Instruction";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "solana_program::sysvar::instructions::get_instruction_relative",
                                          []
                                        |),
                                        [
                                          M.read (| proof_instruction_offset |);
                                          M.read (| sysvar_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.path
                                                        "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                M.read (|
                                  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_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext"
                                                  ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::proof::decode_proof_instruction_context",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityData";
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext"
                                                ]
                                              |),
                                              [
                                                Value.StructTuple
                                                  "solana_zk_token_sdk::zk_token_proof_instruction::ProofInstruction::VerifyPubkeyValidity"
                                                  [];
                                                zkp_instruction
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::pubkey_validity::PubkeyValidityProofContext";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ]
                                                        ],
                                                        "from_residual",
                                                        []
                                                      |),
                                                      [ M.read (| residual |) ]
                                                    |)
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ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.impossible
        end.
      
      (*
      pub fn verify_empty_account_proof(
          account_info_iter: &mut Iter<'_, AccountInfo<'_>>,
          proof_instruction_offset: i64,
      ) -> Result<ZeroBalanceProofContext, ProgramError> {
          if proof_instruction_offset == 0 {
              // interpret `account_info` as a context state account
              let context_state_account_info = next_account_info(account_info_iter)?;
              check_zk_token_proof_program_account(context_state_account_info.owner)?;
              let context_state_account_data = context_state_account_info.data.borrow();
              let context_state = pod_from_bytes::<ProofContextState<ZeroBalanceProofContext>>(
                  &context_state_account_data,
              )?;
      
              if context_state.proof_type != ProofType::ZeroBalance.into() {
                  return Err(ProgramError::InvalidInstructionData);
              }
      
              Ok(context_state.proof_context)
          } else {
              // interpret `account_info` as a sysvar
              let sysvar_account_info = next_account_info(account_info_iter)?;
              let zkp_instruction =
                  get_instruction_relative(proof_instruction_offset, sysvar_account_info)?;
              Ok( *decode_proof_instruction_context::<
                  ZeroBalanceProofData,
                  ZeroBalanceProofContext,
              >(
                  ProofInstruction::VerifyZeroBalance, &zkp_instruction
              )?)
          }
      }
      *)
      Definition verify_empty_account_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info_iter; proof_instruction_offset ] =>
          ltac:(M.monadic
            (let account_info_iter := M.alloc (| account_info_iter |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.Pure.eq
                                  (M.read (| proof_instruction_offset |))
                                  (Value.Integer 0)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let context_state_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.path
                                                        "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        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_zk_token_proof_program_account",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| context_state_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.path
                                                      "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ]
                                                ],
                                                "from_residual",
                                                []
                                              |),
                                              [ M.read (| residual |) ]
                                            |)
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Continue",
                                        0
                                      |) in
                                    let val := M.copy (| γ0_0 |) in
                                    val))
                              ]
                            |) in
                          let context_state_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 (| context_state_account_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "data"
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |) in
                          let context_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 "&")
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext"
                                                ]
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_pod::bytemuck::pod_from_bytes",
                                          [
                                            Ty.apply
                                              (Ty.path
                                                "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext"
                                              ]
                                          ]
                                        |),
                                        [
                                          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",
                                                []
                                              |),
                                              [ context_state_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.path
                                                        "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::cmp::PartialEq",
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                              ],
                                              "ne",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| context_state |),
                                                "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                "proof_type"
                                              |);
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::convert::Into",
                                                    Ty.path
                                                      "solana_zk_token_sdk::instruction::ProofType",
                                                    [
                                                      Ty.path
                                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                    ],
                                                    "into",
                                                    []
                                                  |),
                                                  [
                                                    Value.StructTuple
                                                      "solana_zk_token_sdk::instruction::ProofType::ZeroBalance"
                                                      []
                                                  ]
                                                |)
                                              |)
                                            ]
                                          |)
                                        |)) 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::InvalidInstructionData"
                                                  []
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| context_state |),
                                    "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                    "proof_context"
                                  |)
                                |)
                              ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let sysvar_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.path
                                                        "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let zkp_instruction :=
                            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::instruction::Instruction";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "solana_program::sysvar::instructions::get_instruction_relative",
                                          []
                                        |),
                                        [
                                          M.read (| proof_instruction_offset |);
                                          M.read (| sysvar_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.path
                                                        "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                M.read (|
                                  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_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext"
                                                  ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::proof::decode_proof_instruction_context",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofData";
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext"
                                                ]
                                              |),
                                              [
                                                Value.StructTuple
                                                  "solana_zk_token_sdk::zk_token_proof_instruction::ProofInstruction::VerifyZeroBalance"
                                                  [];
                                                zkp_instruction
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::zero_balance::ZeroBalanceProofContext";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ]
                                                        ],
                                                        "from_residual",
                                                        []
                                                      |),
                                                      [ M.read (| residual |) ]
                                                    |)
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ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.impossible
        end.
      
      (*
      pub fn verify_withdraw_proof(
          account_info_iter: &mut Iter<'_, AccountInfo<'_>>,
          proof_instruction_offset: i64,
      ) -> Result<WithdrawProofContext, ProgramError> {
          if proof_instruction_offset == 0 {
              // interpret `account_info` as a context state account
              let context_state_account_info = next_account_info(account_info_iter)?;
              check_zk_token_proof_program_account(context_state_account_info.owner)?;
              let context_state_account_data = context_state_account_info.data.borrow();
              let context_state =
                  pod_from_bytes::<ProofContextState<WithdrawProofContext>>(&context_state_account_data)?;
      
              if context_state.proof_type != ProofType::Withdraw.into() {
                  return Err(ProgramError::InvalidInstructionData);
              }
      
              Ok(context_state.proof_context)
          } else {
              // interpret `account_info` as a sysvar
              let sysvar_account_info = next_account_info(account_info_iter)?;
              let zkp_instruction =
                  get_instruction_relative(proof_instruction_offset, sysvar_account_info)?;
              Ok( *decode_proof_instruction_context::<
                  WithdrawData,
                  WithdrawProofContext,
              >(
                  ProofInstruction::VerifyWithdraw, &zkp_instruction
              )?)
          }
      }
      *)
      Definition verify_withdraw_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info_iter; proof_instruction_offset ] =>
          ltac:(M.monadic
            (let account_info_iter := M.alloc (| account_info_iter |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                BinOp.Pure.eq
                                  (M.read (| proof_instruction_offset |))
                                  (Value.Integer 0)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let context_state_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.path
                                                        "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        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_zk_token_proof_program_account",
                                        []
                                      |),
                                      [
                                        M.read (|
                                          M.SubPointer.get_struct_record_field (|
                                            M.read (| context_state_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.path
                                                      "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.path "core::convert::Infallible";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ]
                                                ],
                                                "from_residual",
                                                []
                                              |),
                                              [ M.read (| residual |) ]
                                            |)
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ0_0 :=
                                      M.SubPointer.get_struct_tuple_field (|
                                        γ,
                                        "core::ops::control_flow::ControlFlow::Continue",
                                        0
                                      |) in
                                    let val := M.copy (| γ0_0 |) in
                                    val))
                              ]
                            |) in
                          let context_state_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 (| context_state_account_info |),
                                        "solana_program::account_info::AccountInfo",
                                        "data"
                                      |)
                                    ]
                                  |)
                                ]
                              |)
                            |) in
                          let context_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 "&")
                                            [
                                              Ty.apply
                                                (Ty.path
                                                  "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext"
                                                ]
                                            ];
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_pod::bytemuck::pod_from_bytes",
                                          [
                                            Ty.apply
                                              (Ty.path
                                                "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext"
                                              ]
                                          ]
                                        |),
                                        [
                                          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",
                                                []
                                              |),
                                              [ context_state_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.path
                                                        "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::cmp::PartialEq",
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                              [
                                                Ty.path
                                                  "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                              ],
                                              "ne",
                                              []
                                            |),
                                            [
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| context_state |),
                                                "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                "proof_type"
                                              |);
                                              M.alloc (|
                                                M.call_closure (|
                                                  M.get_trait_method (|
                                                    "core::convert::Into",
                                                    Ty.path
                                                      "solana_zk_token_sdk::instruction::ProofType",
                                                    [
                                                      Ty.path
                                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                    ],
                                                    "into",
                                                    []
                                                  |),
                                                  [
                                                    Value.StructTuple
                                                      "solana_zk_token_sdk::instruction::ProofType::Withdraw"
                                                      []
                                                  ]
                                                |)
                                              |)
                                            ]
                                          |)
                                        |)) 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::InvalidInstructionData"
                                                  []
                                              ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| context_state |),
                                    "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                    "proof_context"
                                  |)
                                |)
                              ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (let sysvar_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.path
                                                        "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let zkp_instruction :=
                            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::instruction::Instruction";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "solana_program::sysvar::instructions::get_instruction_relative",
                                          []
                                        |),
                                        [
                                          M.read (| proof_instruction_offset |);
                                          M.read (| sysvar_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.path
                                                        "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                M.read (|
                                  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_zk_token_sdk::instruction::withdraw::WithdrawProofContext"
                                                  ];
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ],
                                            [],
                                            "branch",
                                            []
                                          |),
                                          [
                                            M.call_closure (|
                                              M.get_function (|
                                                "spl_token_2022::proof::decode_proof_instruction_context",
                                                [
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::withdraw::WithdrawData";
                                                  Ty.path
                                                    "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext"
                                                ]
                                              |),
                                              [
                                                Value.StructTuple
                                                  "solana_zk_token_sdk::zk_token_proof_instruction::ProofInstruction::VerifyWithdraw"
                                                  [];
                                                zkp_instruction
                                              ]
                                            |)
                                          ]
                                        |)
                                      |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Break",
                                                0
                                              |) in
                                            let residual := M.copy (| γ0_0 |) in
                                            M.alloc (|
                                              M.never_to_any (|
                                                M.read (|
                                                  M.return_ (|
                                                    M.call_closure (|
                                                      M.get_trait_method (|
                                                        "core::ops::try_trait::FromResidual",
                                                        Ty.apply
                                                          (Ty.path "core::result::Result")
                                                          [
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::withdraw::WithdrawProofContext";
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ]
                                                        ],
                                                        "from_residual",
                                                        []
                                                      |),
                                                      [ M.read (| residual |) ]
                                                    |)
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ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.impossible
        end.
      
      (*
      pub fn verify_transfer_proof(
          account_info_iter: &mut Iter<'_, AccountInfo<'_>>,
          proof_instruction_offset: i64,
          split_proof_context_state_accounts: bool,
          no_op_on_split_proof_context_state: bool,
          close_split_context_state_on_execution: bool,
          source_decrypt_handles: &SourceDecryptHandles,
      ) -> Result<Option<TransferProofContextInfo>, ProgramError> {
          if proof_instruction_offset == 0 && split_proof_context_state_accounts {
              let equality_proof_context_state_account_info = next_account_info(account_info_iter)?;
              let ciphertext_validity_proof_context_state_account_info =
                  next_account_info(account_info_iter)?;
              let range_proof_context_state_account_info = next_account_info(account_info_iter)?;
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(equality_proof_context_state_account_info.owner).is_ok()
              {
                  msg!("Equality proof context state account not initialized");
                  return Ok(None);
              }
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(
                      ciphertext_validity_proof_context_state_account_info.owner,
                  )
                  .is_ok()
              {
                  msg!("Ciphertext validity proof context state account not initialized");
                  return Ok(None);
              }
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(range_proof_context_state_account_info.owner).is_ok()
              {
                  msg!("Range proof context state account not initialized");
                  return Ok(None);
              }
      
              let equality_proof_context =
                  verify_equality_proof(equality_proof_context_state_account_info)?;
              let ciphertext_validity_proof_context =
                  verify_ciphertext_validity_proof(ciphertext_validity_proof_context_state_account_info)?;
              let range_proof_context =
                  verify_transfer_range_proof(range_proof_context_state_account_info)?;
      
              // The `TransferProofContextInfo` constructor verifies the consistency of the
              // individual proof context and generates a `TransferWithFeeProofInfo` struct
              // that is used to process the rest of the token-2022 logic.
              let transfer_proof_context = TransferProofContextInfo::verify_and_extract(
                  &equality_proof_context,
                  &ciphertext_validity_proof_context,
                  &range_proof_context,
                  source_decrypt_handles,
              )?;
      
              if close_split_context_state_on_execution {
                  let lamport_destination_account_info = next_account_info(account_info_iter)?;
                  let context_state_account_authority_info = next_account_info(account_info_iter)?;
                  let _zk_token_proof_program = next_account_info(account_info_iter)?;
      
                  msg!("Closing equality proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account: equality_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          equality_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
      
                  msg!("Closing ciphertext validity proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account: ciphertext_validity_proof_context_state_account_info
                                  .key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          ciphertext_validity_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
      
                  msg!("Closing range proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account: range_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          range_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
              }
      
              Ok(Some(transfer_proof_context))
          } else if proof_instruction_offset == 0 && !split_proof_context_state_accounts {
              // interpret `account_info` as a context state account
              let context_state_account_info = next_account_info(account_info_iter)?;
              check_zk_token_proof_program_account(context_state_account_info.owner)?;
              let context_state_account_data = context_state_account_info.data.borrow();
              let context_state =
                  pod_from_bytes::<ProofContextState<TransferProofContext>>(&context_state_account_data)?;
      
              if context_state.proof_type != ProofType::Transfer.into() {
                  return Err(ProgramError::InvalidInstructionData);
              }
      
              Ok(Some(context_state.proof_context.into()))
          } else {
              // interpret `account_info` as sysvar
              let sysvar_account_info = next_account_info(account_info_iter)?;
              let zkp_instruction =
                  get_instruction_relative(proof_instruction_offset, sysvar_account_info)?;
              let proof_context = ( *decode_proof_instruction_context::<
                  TransferData,
                  TransferProofContext,
              >(ProofInstruction::VerifyTransfer, &zkp_instruction)?)
              .into();
      
              Ok(Some(proof_context))
          }
      }
      *)
      Definition verify_transfer_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              account_info_iter;
              proof_instruction_offset;
              split_proof_context_state_accounts;
              no_op_on_split_proof_context_state;
              close_split_context_state_on_execution;
              source_decrypt_handles
            ] =>
          ltac:(M.monadic
            (let account_info_iter := M.alloc (| account_info_iter |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            let split_proof_context_state_accounts :=
              M.alloc (| split_proof_context_state_accounts |) in
            let no_op_on_split_proof_context_state :=
              M.alloc (| no_op_on_split_proof_context_state |) in
            let close_split_context_state_on_execution :=
              M.alloc (| close_split_context_state_on_execution |) in
            let source_decrypt_handles := M.alloc (| source_decrypt_handles |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.and (|
                                  BinOp.Pure.eq
                                    (M.read (| proof_instruction_offset |))
                                    (Value.Integer 0),
                                  ltac:(M.monadic (M.read (| split_proof_context_state_accounts |)))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let equality_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let ciphertext_validity_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let range_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          LogicalOp.and (|
                                            M.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              equality_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Equality proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              ciphertext_validity_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Ciphertext validity proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              range_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Range proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let equality_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::ciphertext_commitment_equality::CiphertextCommitmentEqualityProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_equality_proof",
                                          []
                                        |),
                                        [ M.read (| equality_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let ciphertext_validity_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_ciphertext_validity_proof",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            ciphertext_validity_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let range_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_transfer_range_proof",
                                          []
                                        |),
                                        [ M.read (| range_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let transfer_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo",
                                          "verify_and_extract",
                                          []
                                        |),
                                        [
                                          equality_proof_context;
                                          ciphertext_validity_proof_context;
                                          range_proof_context;
                                          M.read (| source_decrypt_handles |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        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 close_split_context_state_on_execution in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let lamport_destination_account_info :=
                                      M.copy (|
                                        M.match_operator (|
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::Try",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&")
                                                      [
                                                        Ty.path
                                                          "solana_program::account_info::AccountInfo"
                                                      ];
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_function (|
                                                    "solana_program::account_info::next_account_info",
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::slice::iter::Iter")
                                                        [
                                                          Ty.path
                                                            "solana_program::account_info::AccountInfo"
                                                        ]
                                                    ]
                                                  |),
                                                  [ M.read (| account_info_iter |) ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Break",
                                                    0
                                                  |) in
                                                let residual := M.copy (| γ0_0 |) in
                                                M.alloc (|
                                                  M.never_to_any (|
                                                    M.read (|
                                                      M.return_ (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::try_trait::FromResidual",
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::option::Option")
                                                                  [
                                                                    Ty.path
                                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                  ];
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Continue",
                                                    0
                                                  |) in
                                                let val := M.copy (| γ0_0 |) in
                                                val))
                                          ]
                                        |)
                                      |) in
                                    let context_state_account_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.apply
                                                                  (Ty.path "core::option::Option")
                                                                  [
                                                                    Ty.path
                                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                  ];
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Continue",
                                                    0
                                                  |) in
                                                let val := M.copy (| γ0_0 |) in
                                                val))
                                          ]
                                        |)
                                      |) in
                                    let _zk_token_proof_program :=
                                      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.apply
                                                                  (Ty.path "core::option::Option")
                                                                  [
                                                                    Ty.path
                                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                  ];
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing equality proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    equality_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                equality_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing ciphertext validity proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    ciphertext_validity_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                ciphertext_validity_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing range proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    range_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                range_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |) in
                                    M.alloc (| Value.Tuple [] |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                Value.StructTuple
                                  "core::option::Option::Some"
                                  [ M.read (| transfer_proof_context |) ]
                              ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        LogicalOp.and (|
                                          BinOp.Pure.eq
                                            (M.read (| proof_instruction_offset |))
                                            (Value.Integer 0),
                                          ltac:(M.monadic
                                            (UnOp.Pure.not
                                              (M.read (| split_proof_context_state_accounts |))))
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let context_state_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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_zk_token_proof_program_account",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| context_state_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.apply
                                                              (Ty.path "core::option::Option")
                                                              [
                                                                Ty.path
                                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                              ];
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ]
                                                        ],
                                                        "from_residual",
                                                        []
                                                      |),
                                                      [ M.read (| residual |) ]
                                                    |)
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Continue",
                                                0
                                              |) in
                                            let val := M.copy (| γ0_0 |) in
                                            val))
                                      ]
                                    |) in
                                  let context_state_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 (| context_state_account_info |),
                                                "solana_program::account_info::AccountInfo",
                                                "data"
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let context_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 "&")
                                                    [
                                                      Ty.apply
                                                        (Ty.path
                                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::instruction::transfer::without_fee::TransferProofContext"
                                                        ]
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "spl_pod::bytemuck::pod_from_bytes",
                                                  [
                                                    Ty.apply
                                                      (Ty.path
                                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                      [
                                                        Ty.path
                                                          "solana_zk_token_sdk::instruction::transfer::without_fee::TransferProofContext"
                                                      ]
                                                  ]
                                                |),
                                                [
                                                  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",
                                                        []
                                                      |),
                                                      [ context_state_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::cmp::PartialEq",
                                                      Ty.path
                                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                                      [
                                                        Ty.path
                                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                      ],
                                                      "ne",
                                                      []
                                                    |),
                                                    [
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| context_state |),
                                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                        "proof_type"
                                                      |);
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::Into",
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::ProofType",
                                                            [
                                                              Ty.path
                                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                            ],
                                                            "into",
                                                            []
                                                          |),
                                                          [
                                                            Value.StructTuple
                                                              "solana_zk_token_sdk::instruction::ProofType::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::Err"
                                                      [
                                                        Value.StructTuple
                                                          "solana_program::program_error::ProgramError::InvalidInstructionData"
                                                          []
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (|
                                    Value.StructTuple
                                      "core::result::Result::Ok"
                                      [
                                        Value.StructTuple
                                          "core::option::Option::Some"
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::convert::Into",
                                                Ty.path
                                                  "solana_zk_token_sdk::instruction::transfer::without_fee::TransferProofContext",
                                                [
                                                  Ty.path
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                ],
                                                "into",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| context_state |),
                                                    "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                    "proof_context"
                                                  |)
                                                |)
                                              ]
                                            |)
                                          ]
                                      ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let sysvar_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let zkp_instruction :=
                                    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::instruction::Instruction";
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::sysvar::instructions::get_instruction_relative",
                                                  []
                                                |),
                                                [
                                                  M.read (| proof_instruction_offset |);
                                                  M.read (| sysvar_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let proof_context :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::Into",
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::transfer::without_fee::TransferProofContext",
                                          [
                                            Ty.path
                                              "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                          ],
                                          "into",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            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_zk_token_sdk::instruction::transfer::without_fee::TransferProofContext"
                                                            ];
                                                          Ty.path
                                                            "solana_program::program_error::ProgramError"
                                                        ],
                                                      [],
                                                      "branch",
                                                      []
                                                    |),
                                                    [
                                                      M.call_closure (|
                                                        M.get_function (|
                                                          "spl_token_2022::proof::decode_proof_instruction_context",
                                                          [
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::transfer::without_fee::TransferData";
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::transfer::without_fee::TransferProofContext"
                                                          ]
                                                        |),
                                                        [
                                                          Value.StructTuple
                                                            "solana_zk_token_sdk::zk_token_proof_instruction::ProofInstruction::VerifyTransfer"
                                                            [];
                                                          zkp_instruction
                                                        ]
                                                      |)
                                                    ]
                                                  |)
                                                |),
                                                [
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_0 :=
                                                        M.SubPointer.get_struct_tuple_field (|
                                                          γ,
                                                          "core::ops::control_flow::ControlFlow::Break",
                                                          0
                                                        |) in
                                                      let residual := M.copy (| γ0_0 |) in
                                                      M.alloc (|
                                                        M.never_to_any (|
                                                          M.read (|
                                                            M.return_ (|
                                                              M.call_closure (|
                                                                M.get_trait_method (|
                                                                  "core::ops::try_trait::FromResidual",
                                                                  Ty.apply
                                                                    (Ty.path "core::result::Result")
                                                                    [
                                                                      Ty.apply
                                                                        (Ty.path
                                                                          "core::option::Option")
                                                                        [
                                                                          Ty.path
                                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferProofContextInfo"
                                                                        ];
                                                                      Ty.path
                                                                        "solana_program::program_error::ProgramError"
                                                                    ],
                                                                  [
                                                                    Ty.apply
                                                                      (Ty.path
                                                                        "core::result::Result")
                                                                      [
                                                                        Ty.path
                                                                          "core::convert::Infallible";
                                                                        Ty.path
                                                                          "solana_program::program_error::ProgramError"
                                                                      ]
                                                                  ],
                                                                  "from_residual",
                                                                  []
                                                                |),
                                                                [ M.read (| residual |) ]
                                                              |)
                                                            |)
                                                          |)
                                                        |)
                                                      |)));
                                                  fun γ =>
                                                    ltac:(M.monadic
                                                      (let γ0_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.StructTuple
                                          "core::option::Option::Some"
                                          [ M.read (| proof_context |) ]
                                      ]
                                  |)))
                            ]
                          |)))
                    ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      pub fn verify_transfer_with_fee_proof(
          account_info_iter: &mut Iter<'_, AccountInfo<'_>>,
          proof_instruction_offset: i64,
          split_proof_context_state_accounts: bool,
          no_op_on_split_proof_context_state: bool,
          close_split_context_state_on_execution: bool,
          source_decrypt_handles: &SourceDecryptHandles,
          fee_parameters: &TransferFee,
      ) -> Result<Option<TransferWithFeeProofContextInfo>, ProgramError> {
          if proof_instruction_offset == 0 && split_proof_context_state_accounts {
              let equality_proof_context_state_account_info = next_account_info(account_info_iter)?;
              let transfer_amount_ciphertext_validity_proof_context_state_account_info =
                  next_account_info(account_info_iter)?;
              let fee_sigma_proof_context_state_account_info = next_account_info(account_info_iter)?;
              let fee_ciphertext_validity_proof_context_state_account_info =
                  next_account_info(account_info_iter)?;
              let range_proof_context_state_account_info = next_account_info(account_info_iter)?;
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(equality_proof_context_state_account_info.owner).is_ok()
              {
                  msg!("Equality proof context state account not initialized");
                  return Ok(None);
              }
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(
                      transfer_amount_ciphertext_validity_proof_context_state_account_info.owner,
                  )
                  .is_ok()
              {
                  msg!("Transfer amount ciphertext validity proof context state account not initialized");
                  return Ok(None);
              }
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(fee_sigma_proof_context_state_account_info.owner)
                      .is_ok()
              {
                  msg!("Fee sigma proof context state account not initialized");
                  return Ok(None);
              }
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(
                      fee_ciphertext_validity_proof_context_state_account_info.owner,
                  )
                  .is_ok()
              {
                  msg!("Fee ciphertext validity proof context state account not initialized");
                  return Ok(None);
              }
      
              if no_op_on_split_proof_context_state
                  && check_system_program_account(range_proof_context_state_account_info.owner).is_ok()
              {
                  msg!("Range proof context state account not initialized");
                  return Ok(None);
              }
      
              let equality_proof_context =
                  verify_equality_proof(equality_proof_context_state_account_info)?;
              let transfer_amount_ciphertext_validity_proof_context = verify_ciphertext_validity_proof(
                  transfer_amount_ciphertext_validity_proof_context_state_account_info,
              )?;
              let fee_sigma_proof_context =
                  verify_fee_sigma_proof(fee_sigma_proof_context_state_account_info)?;
              let fee_ciphertext_validity_proof_context = verify_ciphertext_validity_proof(
                  fee_ciphertext_validity_proof_context_state_account_info,
              )?;
              let range_proof_context =
                  verify_transfer_with_fee_range_proof(range_proof_context_state_account_info)?;
      
              // The `TransferWithFeeProofContextInfo` constructor verifies the consistency of
              // the individual proof context and generates a
              // `TransferWithFeeProofInfo` struct that is used to process the rest of
              // the token-2022 logic. The consistency check includes verifying
              // whether the fee-related zkps were generated with respect to the correct fee
              // parameter that is stored in the mint extension.
              let transfer_with_fee_proof_context = TransferWithFeeProofContextInfo::verify_and_extract(
                  &equality_proof_context,
                  &transfer_amount_ciphertext_validity_proof_context,
                  &fee_sigma_proof_context,
                  &fee_ciphertext_validity_proof_context,
                  &range_proof_context,
                  source_decrypt_handles,
                  fee_parameters,
              )?;
      
              if close_split_context_state_on_execution {
                  let lamport_destination_account_info = next_account_info(account_info_iter)?;
                  let context_state_account_authority_info = next_account_info(account_info_iter)?;
                  let _zk_token_proof_program = next_account_info(account_info_iter)?;
      
                  msg!("Closing equality proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account: equality_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          equality_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
      
                  msg!("Closing transfer amount ciphertext validity proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account:
                                  transfer_amount_ciphertext_validity_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          transfer_amount_ciphertext_validity_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
      
                  msg!("Closing fee sigma proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account: fee_sigma_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          fee_sigma_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
      
                  msg!("Closing fee ciphertext validity proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account:
                                  fee_ciphertext_validity_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          fee_ciphertext_validity_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
      
                  msg!("Closing range proof context state account");
                  invoke(
                      &zk_token_proof_instruction::close_context_state(
                          ContextStateInfo {
                              context_state_account: range_proof_context_state_account_info.key,
                              context_state_authority: context_state_account_authority_info.key,
                          },
                          lamport_destination_account_info.key,
                      ),
                      &[
                          range_proof_context_state_account_info.clone(),
                          lamport_destination_account_info.clone(),
                          context_state_account_authority_info.clone(),
                      ],
                  )?;
              }
      
              Ok(Some(transfer_with_fee_proof_context))
          } else if proof_instruction_offset == 0 && !split_proof_context_state_accounts {
              // interpret `account_info` as a context state account
              let context_state_account_info = next_account_info(account_info_iter)?;
              check_zk_token_proof_program_account(context_state_account_info.owner)?;
              let context_state_account_data = context_state_account_info.data.borrow();
              let context_state = pod_from_bytes::<ProofContextState<TransferWithFeeProofContext>>(
                  &context_state_account_data,
              )?;
      
              if context_state.proof_type != ProofType::TransferWithFee.into() {
                  return Err(ProgramError::InvalidInstructionData);
              }
      
              let proof_tranfer_fee_basis_points: u16 = context_state
                  .proof_context
                  .fee_parameters
                  .fee_rate_basis_points
                  .into();
              let proof_maximum_fee: u64 = context_state
                  .proof_context
                  .fee_parameters
                  .maximum_fee
                  .into();
      
              // check consistency of the transfer fee parameters in the mint extension with
              // what were used to generate the zkp, which is not checked in the
              // `From<TransferWithFeeProofContext>` implementation for
              // `TransferWithFeeProofContextInfo`.
              if u16::from(fee_parameters.transfer_fee_basis_points) != proof_tranfer_fee_basis_points
                  || u64::from(fee_parameters.maximum_fee) != proof_maximum_fee
              {
                  return Err(TokenError::FeeParametersMismatch.into());
              }
      
              Ok(Some(context_state.proof_context.into()))
          } else {
              // interpret `account_info` as sysvar
              let sysvar_account_info = next_account_info(account_info_iter)?;
              let zkp_instruction =
                  get_instruction_relative(proof_instruction_offset, sysvar_account_info)?;
              let proof_context = decode_proof_instruction_context::<
                  TransferWithFeeData,
                  TransferWithFeeProofContext,
              >(ProofInstruction::VerifyTransferWithFee, &zkp_instruction)?;
      
              let proof_tranfer_fee_basis_points: u16 =
                  proof_context.fee_parameters.fee_rate_basis_points.into();
              let proof_maximum_fee: u64 = proof_context.fee_parameters.maximum_fee.into();
      
              // check consistency of the transfer fee parameters in the mint extension with
              // what were used to generate the zkp, which is not checked in the
              // `From<TransferWithFeeProofContext>` implementation for
              // `TransferWithFeeProofContextInfo`.
              if u16::from(fee_parameters.transfer_fee_basis_points) != proof_tranfer_fee_basis_points
                  || u64::from(fee_parameters.maximum_fee) != proof_maximum_fee
              {
                  return Err(TokenError::FeeParametersMismatch.into());
              }
      
              Ok(Some(( *proof_context).into()))
          }
      }
      *)
      Definition verify_transfer_with_fee_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [],
            [
              account_info_iter;
              proof_instruction_offset;
              split_proof_context_state_accounts;
              no_op_on_split_proof_context_state;
              close_split_context_state_on_execution;
              source_decrypt_handles;
              fee_parameters
            ] =>
          ltac:(M.monadic
            (let account_info_iter := M.alloc (| account_info_iter |) in
            let proof_instruction_offset := M.alloc (| proof_instruction_offset |) in
            let split_proof_context_state_accounts :=
              M.alloc (| split_proof_context_state_accounts |) in
            let no_op_on_split_proof_context_state :=
              M.alloc (| no_op_on_split_proof_context_state |) in
            let close_split_context_state_on_execution :=
              M.alloc (| close_split_context_state_on_execution |) in
            let source_decrypt_handles := M.alloc (| source_decrypt_handles |) in
            let fee_parameters := M.alloc (| fee_parameters |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  M.match_operator (|
                    M.alloc (| Value.Tuple [] |),
                    [
                      fun γ =>
                        ltac:(M.monadic
                          (let γ :=
                            M.use
                              (M.alloc (|
                                LogicalOp.and (|
                                  BinOp.Pure.eq
                                    (M.read (| proof_instruction_offset |))
                                    (Value.Integer 0),
                                  ltac:(M.monadic (M.read (| split_proof_context_state_accounts |)))
                                |)
                              |)) in
                          let _ :=
                            M.is_constant_or_break_match (| M.read (| γ |), Value.Bool true |) in
                          let equality_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let
                                transfer_amount_ciphertext_validity_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let fee_sigma_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let fee_ciphertext_validity_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let range_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let _ :=
                            M.match_operator (|
                              M.alloc (| Value.Tuple [] |),
                              [
                                fun γ =>
                                  ltac:(M.monadic
                                    (let γ :=
                                      M.use
                                        (M.alloc (|
                                          LogicalOp.and (|
                                            M.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              equality_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Equality proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              transfer_amount_ciphertext_validity_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Transfer amount ciphertext validity proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              fee_sigma_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Fee sigma proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              fee_ciphertext_validity_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Fee ciphertext validity proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                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.read (| no_op_on_split_proof_context_state |),
                                            ltac:(M.monadic
                                              (M.call_closure (|
                                                M.get_associated_function (|
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.tuple [];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  "is_ok",
                                                  []
                                                |),
                                                [
                                                  M.alloc (|
                                                    M.call_closure (|
                                                      M.get_function (|
                                                        "spl_token_2022::check_system_program_account",
                                                        []
                                                      |),
                                                      [
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              range_proof_context_state_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "owner"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |)
                                                ]
                                              |)))
                                          |)
                                        |)) in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    M.alloc (|
                                      M.never_to_any (|
                                        M.read (|
                                          let _ :=
                                            M.alloc (|
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::log::sol_log",
                                                  []
                                                |),
                                                [
                                                  M.read (|
                                                    Value.String
                                                      "Range proof context state account not initialized"
                                                  |)
                                                ]
                                              |)
                                            |) in
                                          M.return_ (|
                                            Value.StructTuple
                                              "core::result::Result::Ok"
                                              [ Value.StructTuple "core::option::Option::None" [] ]
                                          |)
                                        |)
                                      |)
                                    |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          let equality_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::ciphertext_commitment_equality::CiphertextCommitmentEqualityProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_equality_proof",
                                          []
                                        |),
                                        [ M.read (| equality_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let transfer_amount_ciphertext_validity_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_ciphertext_validity_proof",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            transfer_amount_ciphertext_validity_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let fee_sigma_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::fee_sigma::FeeSigmaProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_fee_sigma_proof",
                                          []
                                        |),
                                        [ M.read (| fee_sigma_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let fee_ciphertext_validity_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_ciphertext_validity_proof",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            fee_ciphertext_validity_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let range_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_function (|
                                          "spl_token_2022::extension::confidential_transfer::verify_proof::verify_transfer_with_fee_range_proof",
                                          []
                                        |),
                                        [ M.read (| range_proof_context_state_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.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Continue",
                                          0
                                        |) in
                                      let val := M.copy (| γ0_0 |) in
                                      val))
                                ]
                              |)
                            |) in
                          let transfer_with_fee_proof_context :=
                            M.copy (|
                              M.match_operator (|
                                M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::ops::try_trait::Try",
                                      Ty.apply
                                        (Ty.path "core::result::Result")
                                        [
                                          Ty.path
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo";
                                          Ty.path "solana_program::program_error::ProgramError"
                                        ],
                                      [],
                                      "branch",
                                      []
                                    |),
                                    [
                                      M.call_closure (|
                                        M.get_associated_function (|
                                          Ty.path
                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo",
                                          "verify_and_extract",
                                          []
                                        |),
                                        [
                                          equality_proof_context;
                                          transfer_amount_ciphertext_validity_proof_context;
                                          fee_sigma_proof_context;
                                          fee_ciphertext_validity_proof_context;
                                          range_proof_context;
                                          M.read (| source_decrypt_handles |);
                                          M.read (| fee_parameters |)
                                        ]
                                      |)
                                    ]
                                  |)
                                |),
                                [
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        M.SubPointer.get_struct_tuple_field (|
                                          γ,
                                          "core::ops::control_flow::ControlFlow::Break",
                                          0
                                        |) in
                                      let residual := M.copy (| γ0_0 |) in
                                      M.alloc (|
                                        M.never_to_any (|
                                          M.read (|
                                            M.return_ (|
                                              M.call_closure (|
                                                M.get_trait_method (|
                                                  "core::ops::try_trait::FromResidual",
                                                  Ty.apply
                                                    (Ty.path "core::result::Result")
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::option::Option")
                                                        [
                                                          Ty.path
                                                            "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                        ];
                                                      Ty.path
                                                        "solana_program::program_error::ProgramError"
                                                    ],
                                                  [
                                                    Ty.apply
                                                      (Ty.path "core::result::Result")
                                                      [
                                                        Ty.path "core::convert::Infallible";
                                                        Ty.path
                                                          "solana_program::program_error::ProgramError"
                                                      ]
                                                  ],
                                                  "from_residual",
                                                  []
                                                |),
                                                [ M.read (| residual |) ]
                                              |)
                                            |)
                                          |)
                                        |)
                                      |)));
                                  fun γ =>
                                    ltac:(M.monadic
                                      (let γ0_0 :=
                                        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 close_split_context_state_on_execution in
                                    let _ :=
                                      M.is_constant_or_break_match (|
                                        M.read (| γ |),
                                        Value.Bool true
                                      |) in
                                    let lamport_destination_account_info :=
                                      M.copy (|
                                        M.match_operator (|
                                          M.alloc (|
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::ops::try_trait::Try",
                                                Ty.apply
                                                  (Ty.path "core::result::Result")
                                                  [
                                                    Ty.apply
                                                      (Ty.path "&")
                                                      [
                                                        Ty.path
                                                          "solana_program::account_info::AccountInfo"
                                                      ];
                                                    Ty.path
                                                      "solana_program::program_error::ProgramError"
                                                  ],
                                                [],
                                                "branch",
                                                []
                                              |),
                                              [
                                                M.call_closure (|
                                                  M.get_function (|
                                                    "solana_program::account_info::next_account_info",
                                                    [
                                                      Ty.apply
                                                        (Ty.path "core::slice::iter::Iter")
                                                        [
                                                          Ty.path
                                                            "solana_program::account_info::AccountInfo"
                                                        ]
                                                    ]
                                                  |),
                                                  [ M.read (| account_info_iter |) ]
                                                |)
                                              ]
                                            |)
                                          |),
                                          [
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Break",
                                                    0
                                                  |) in
                                                let residual := M.copy (| γ0_0 |) in
                                                M.alloc (|
                                                  M.never_to_any (|
                                                    M.read (|
                                                      M.return_ (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::ops::try_trait::FromResidual",
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.apply
                                                                  (Ty.path "core::option::Option")
                                                                  [
                                                                    Ty.path
                                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                  ];
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Continue",
                                                    0
                                                  |) in
                                                let val := M.copy (| γ0_0 |) in
                                                val))
                                          ]
                                        |)
                                      |) in
                                    let context_state_account_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.apply
                                                                  (Ty.path "core::option::Option")
                                                                  [
                                                                    Ty.path
                                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                  ];
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  M.SubPointer.get_struct_tuple_field (|
                                                    γ,
                                                    "core::ops::control_flow::ControlFlow::Continue",
                                                    0
                                                  |) in
                                                let val := M.copy (| γ0_0 |) in
                                                val))
                                          ]
                                        |)
                                      |) in
                                    let _zk_token_proof_program :=
                                      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.apply
                                                                  (Ty.path "core::option::Option")
                                                                  [
                                                                    Ty.path
                                                                      "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                  ];
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ],
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::result::Result")
                                                                [
                                                                  Ty.path
                                                                    "core::convert::Infallible";
                                                                  Ty.path
                                                                    "solana_program::program_error::ProgramError"
                                                                ]
                                                            ],
                                                            "from_residual",
                                                            []
                                                          |),
                                                          [ M.read (| residual |) ]
                                                        |)
                                                      |)
                                                    |)
                                                  |)
                                                |)));
                                            fun γ =>
                                              ltac:(M.monadic
                                                (let γ0_0 :=
                                                  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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing equality proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    equality_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                equality_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing transfer amount ciphertext validity proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    transfer_amount_ciphertext_validity_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                transfer_amount_ciphertext_validity_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing fee sigma proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    fee_sigma_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                fee_sigma_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing fee ciphertext validity proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    fee_ciphertext_validity_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                fee_ciphertext_validity_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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::log::sol_log", [] |),
                                          [
                                            M.read (|
                                              Value.String
                                                "Closing range proof context state account"
                                            |)
                                          ]
                                        |)
                                      |) 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_zk_token_sdk::zk_token_proof_instruction::close_context_state",
                                                        []
                                                      |),
                                                      [
                                                        Value.StructRecord
                                                          "solana_zk_token_sdk::zk_token_proof_instruction::ContextStateInfo"
                                                          [
                                                            ("context_state_account",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    range_proof_context_state_account_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |));
                                                            ("context_state_authority",
                                                              M.read (|
                                                                M.SubPointer.get_struct_record_field (|
                                                                  M.read (|
                                                                    context_state_account_authority_info
                                                                  |),
                                                                  "solana_program::account_info::AccountInfo",
                                                                  "key"
                                                                |)
                                                              |))
                                                          ];
                                                        M.read (|
                                                          M.SubPointer.get_struct_record_field (|
                                                            M.read (|
                                                              lamport_destination_account_info
                                                            |),
                                                            "solana_program::account_info::AccountInfo",
                                                            "key"
                                                          |)
                                                        |)
                                                      ]
                                                    |)
                                                  |);
                                                  (* 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 (|
                                                                range_proof_context_state_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                lamport_destination_account_info
                                                              |)
                                                            ]
                                                          |);
                                                          M.call_closure (|
                                                            M.get_trait_method (|
                                                              "core::clone::Clone",
                                                              Ty.path
                                                                "solana_program::account_info::AccountInfo",
                                                              [],
                                                              "clone",
                                                              []
                                                            |),
                                                            [
                                                              M.read (|
                                                                context_state_account_authority_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |) in
                                    M.alloc (| Value.Tuple [] |)));
                                fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                              ]
                            |) in
                          M.alloc (|
                            Value.StructTuple
                              "core::result::Result::Ok"
                              [
                                Value.StructTuple
                                  "core::option::Option::Some"
                                  [ M.read (| transfer_with_fee_proof_context |) ]
                              ]
                          |)));
                      fun γ =>
                        ltac:(M.monadic
                          (M.match_operator (|
                            M.alloc (| Value.Tuple [] |),
                            [
                              fun γ =>
                                ltac:(M.monadic
                                  (let γ :=
                                    M.use
                                      (M.alloc (|
                                        LogicalOp.and (|
                                          BinOp.Pure.eq
                                            (M.read (| proof_instruction_offset |))
                                            (Value.Integer 0),
                                          ltac:(M.monadic
                                            (UnOp.Pure.not
                                              (M.read (| split_proof_context_state_accounts |))))
                                        |)
                                      |)) in
                                  let _ :=
                                    M.is_constant_or_break_match (|
                                      M.read (| γ |),
                                      Value.Bool true
                                    |) in
                                  let context_state_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                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_zk_token_proof_program_account",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| context_state_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.apply
                                                              (Ty.path "core::option::Option")
                                                              [
                                                                Ty.path
                                                                  "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                              ];
                                                            Ty.path
                                                              "solana_program::program_error::ProgramError"
                                                          ],
                                                        [
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.path "core::convert::Infallible";
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ]
                                                        ],
                                                        "from_residual",
                                                        []
                                                      |),
                                                      [ M.read (| residual |) ]
                                                    |)
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ0_0 :=
                                              M.SubPointer.get_struct_tuple_field (|
                                                γ,
                                                "core::ops::control_flow::ControlFlow::Continue",
                                                0
                                              |) in
                                            let val := M.copy (| γ0_0 |) in
                                            val))
                                      ]
                                    |) in
                                  let context_state_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 (| context_state_account_info |),
                                                "solana_program::account_info::AccountInfo",
                                                "data"
                                              |)
                                            ]
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let context_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 "&")
                                                    [
                                                      Ty.apply
                                                        (Ty.path
                                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                        [
                                                          Ty.path
                                                            "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext"
                                                        ]
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "spl_pod::bytemuck::pod_from_bytes",
                                                  [
                                                    Ty.apply
                                                      (Ty.path
                                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                                      [
                                                        Ty.path
                                                          "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext"
                                                      ]
                                                  ]
                                                |),
                                                [
                                                  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",
                                                        []
                                                      |),
                                                      [ context_state_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  M.call_closure (|
                                                    M.get_trait_method (|
                                                      "core::cmp::PartialEq",
                                                      Ty.path
                                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                                      [
                                                        Ty.path
                                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                      ],
                                                      "ne",
                                                      []
                                                    |),
                                                    [
                                                      M.SubPointer.get_struct_record_field (|
                                                        M.read (| context_state |),
                                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                        "proof_type"
                                                      |);
                                                      M.alloc (|
                                                        M.call_closure (|
                                                          M.get_trait_method (|
                                                            "core::convert::Into",
                                                            Ty.path
                                                              "solana_zk_token_sdk::instruction::ProofType",
                                                            [
                                                              Ty.path
                                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                                            ],
                                                            "into",
                                                            []
                                                          |),
                                                          [
                                                            Value.StructTuple
                                                              "solana_zk_token_sdk::instruction::ProofType::TransferWithFee"
                                                              []
                                                          ]
                                                        |)
                                                      |)
                                                    ]
                                                  |)
                                                |)) 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::InvalidInstructionData"
                                                          []
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  let proof_tranfer_fee_basis_points :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::Into",
                                          Ty.path
                                            "solana_zk_token_sdk::zk_token_elgamal::pod::PodU16",
                                          [ Ty.path "u16" ],
                                          "into",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| context_state |),
                                                  "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                  "proof_context"
                                                |),
                                                "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext",
                                                "fee_parameters"
                                              |),
                                              "solana_zk_token_sdk::zk_token_elgamal::pod::instruction::FeeParameters",
                                              "fee_rate_basis_points"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let proof_maximum_fee :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::Into",
                                          Ty.path
                                            "solana_zk_token_sdk::zk_token_elgamal::pod::PodU64",
                                          [ Ty.path "u64" ],
                                          "into",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.SubPointer.get_struct_record_field (|
                                                  M.read (| context_state |),
                                                  "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                  "proof_context"
                                                |),
                                                "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext",
                                                "fee_parameters"
                                              |),
                                              "solana_zk_token_sdk::zk_token_elgamal::pod::instruction::FeeParameters",
                                              "maximum_fee"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  LogicalOp.or (|
                                                    BinOp.Pure.ne
                                                      (M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::convert::From",
                                                          Ty.path "u16",
                                                          [ Ty.path "spl_pod::primitives::PodU16" ],
                                                          "from",
                                                          []
                                                        |),
                                                        [
                                                          M.read (|
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (| fee_parameters |),
                                                              "spl_token_2022::extension::transfer_fee::TransferFee",
                                                              "transfer_fee_basis_points"
                                                            |)
                                                          |)
                                                        ]
                                                      |))
                                                      (M.read (| proof_tranfer_fee_basis_points |)),
                                                    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 (| fee_parameters |),
                                                                "spl_token_2022::extension::transfer_fee::TransferFee",
                                                                "maximum_fee"
                                                              |)
                                                            |)
                                                          ]
                                                        |))
                                                        (M.read (| proof_maximum_fee |))))
                                                  |)
                                                |)) 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::FeeParametersMismatch"
                                                              []
                                                          ]
                                                        |)
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (|
                                    Value.StructTuple
                                      "core::result::Result::Ok"
                                      [
                                        Value.StructTuple
                                          "core::option::Option::Some"
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::convert::Into",
                                                Ty.path
                                                  "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext",
                                                [
                                                  Ty.path
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                ],
                                                "into",
                                                []
                                              |),
                                              [
                                                M.read (|
                                                  M.SubPointer.get_struct_record_field (|
                                                    M.read (| context_state |),
                                                    "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                                    "proof_context"
                                                  |)
                                                |)
                                              ]
                                            |)
                                          ]
                                      ]
                                  |)));
                              fun γ =>
                                ltac:(M.monadic
                                  (let sysvar_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let zkp_instruction :=
                                    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::instruction::Instruction";
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "solana_program::sysvar::instructions::get_instruction_relative",
                                                  []
                                                |),
                                                [
                                                  M.read (| proof_instruction_offset |);
                                                  M.read (| sysvar_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.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let proof_context :=
                                    M.copy (|
                                      M.match_operator (|
                                        M.alloc (|
                                          M.call_closure (|
                                            M.get_trait_method (|
                                              "core::ops::try_trait::Try",
                                              Ty.apply
                                                (Ty.path "core::result::Result")
                                                [
                                                  Ty.apply
                                                    (Ty.path "&")
                                                    [
                                                      Ty.path
                                                        "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext"
                                                    ];
                                                  Ty.path
                                                    "solana_program::program_error::ProgramError"
                                                ],
                                              [],
                                              "branch",
                                              []
                                            |),
                                            [
                                              M.call_closure (|
                                                M.get_function (|
                                                  "spl_token_2022::proof::decode_proof_instruction_context",
                                                  [
                                                    Ty.path
                                                      "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeData";
                                                    Ty.path
                                                      "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext"
                                                  ]
                                                |),
                                                [
                                                  Value.StructTuple
                                                    "solana_zk_token_sdk::zk_token_proof_instruction::ProofInstruction::VerifyTransferWithFee"
                                                    [];
                                                  zkp_instruction
                                                ]
                                              |)
                                            ]
                                          |)
                                        |),
                                        [
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Break",
                                                  0
                                                |) in
                                              let residual := M.copy (| γ0_0 |) in
                                              M.alloc (|
                                                M.never_to_any (|
                                                  M.read (|
                                                    M.return_ (|
                                                      M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::ops::try_trait::FromResidual",
                                                          Ty.apply
                                                            (Ty.path "core::result::Result")
                                                            [
                                                              Ty.apply
                                                                (Ty.path "core::option::Option")
                                                                [
                                                                  Ty.path
                                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                                ];
                                                              Ty.path
                                                                "solana_program::program_error::ProgramError"
                                                            ],
                                                          [
                                                            Ty.apply
                                                              (Ty.path "core::result::Result")
                                                              [
                                                                Ty.path "core::convert::Infallible";
                                                                Ty.path
                                                                  "solana_program::program_error::ProgramError"
                                                              ]
                                                          ],
                                                          "from_residual",
                                                          []
                                                        |),
                                                        [ M.read (| residual |) ]
                                                      |)
                                                    |)
                                                  |)
                                                |)
                                              |)));
                                          fun γ =>
                                            ltac:(M.monadic
                                              (let γ0_0 :=
                                                M.SubPointer.get_struct_tuple_field (|
                                                  γ,
                                                  "core::ops::control_flow::ControlFlow::Continue",
                                                  0
                                                |) in
                                              let val := M.copy (| γ0_0 |) in
                                              val))
                                        ]
                                      |)
                                    |) in
                                  let proof_tranfer_fee_basis_points :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::Into",
                                          Ty.path
                                            "solana_zk_token_sdk::zk_token_elgamal::pod::PodU16",
                                          [ Ty.path "u16" ],
                                          "into",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| proof_context |),
                                                "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext",
                                                "fee_parameters"
                                              |),
                                              "solana_zk_token_sdk::zk_token_elgamal::pod::instruction::FeeParameters",
                                              "fee_rate_basis_points"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let proof_maximum_fee :=
                                    M.alloc (|
                                      M.call_closure (|
                                        M.get_trait_method (|
                                          "core::convert::Into",
                                          Ty.path
                                            "solana_zk_token_sdk::zk_token_elgamal::pod::PodU64",
                                          [ Ty.path "u64" ],
                                          "into",
                                          []
                                        |),
                                        [
                                          M.read (|
                                            M.SubPointer.get_struct_record_field (|
                                              M.SubPointer.get_struct_record_field (|
                                                M.read (| proof_context |),
                                                "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext",
                                                "fee_parameters"
                                              |),
                                              "solana_zk_token_sdk::zk_token_elgamal::pod::instruction::FeeParameters",
                                              "maximum_fee"
                                            |)
                                          |)
                                        ]
                                      |)
                                    |) in
                                  let _ :=
                                    M.match_operator (|
                                      M.alloc (| Value.Tuple [] |),
                                      [
                                        fun γ =>
                                          ltac:(M.monadic
                                            (let γ :=
                                              M.use
                                                (M.alloc (|
                                                  LogicalOp.or (|
                                                    BinOp.Pure.ne
                                                      (M.call_closure (|
                                                        M.get_trait_method (|
                                                          "core::convert::From",
                                                          Ty.path "u16",
                                                          [ Ty.path "spl_pod::primitives::PodU16" ],
                                                          "from",
                                                          []
                                                        |),
                                                        [
                                                          M.read (|
                                                            M.SubPointer.get_struct_record_field (|
                                                              M.read (| fee_parameters |),
                                                              "spl_token_2022::extension::transfer_fee::TransferFee",
                                                              "transfer_fee_basis_points"
                                                            |)
                                                          |)
                                                        ]
                                                      |))
                                                      (M.read (| proof_tranfer_fee_basis_points |)),
                                                    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 (| fee_parameters |),
                                                                "spl_token_2022::extension::transfer_fee::TransferFee",
                                                                "maximum_fee"
                                                              |)
                                                            |)
                                                          ]
                                                        |))
                                                        (M.read (| proof_maximum_fee |))))
                                                  |)
                                                |)) 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::FeeParametersMismatch"
                                                              []
                                                          ]
                                                        |)
                                                      ]
                                                  |)
                                                |)
                                              |)
                                            |)));
                                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                                      ]
                                    |) in
                                  M.alloc (|
                                    Value.StructTuple
                                      "core::result::Result::Ok"
                                      [
                                        Value.StructTuple
                                          "core::option::Option::Some"
                                          [
                                            M.call_closure (|
                                              M.get_trait_method (|
                                                "core::convert::Into",
                                                Ty.path
                                                  "solana_zk_token_sdk::instruction::transfer::with_fee::TransferWithFeeProofContext",
                                                [
                                                  Ty.path
                                                    "spl_token_2022::extension::confidential_transfer::ciphertext_extraction::TransferWithFeeProofContextInfo"
                                                ],
                                                "into",
                                                []
                                              |),
                                              [ M.read (| M.read (| proof_context |) |) ]
                                            |)
                                          ]
                                      ]
                                  |)))
                            ]
                          |)))
                    ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn verify_equality_proof(
          account_info: &AccountInfo<'_>,
      ) -> Result<CiphertextCommitmentEqualityProofContext, ProgramError> {
          check_zk_token_proof_program_account(account_info.owner)?;
          let context_state_account_data = account_info.data.borrow();
          let equality_proof_context_state = pod_from_bytes::<
              ProofContextState<CiphertextCommitmentEqualityProofContext>,
          >(&context_state_account_data)?;
      
          if equality_proof_context_state.proof_type != ProofType::CiphertextCommitmentEquality.into() {
              return Err(ProgramError::InvalidInstructionData);
          }
      
          Ok(equality_proof_context_state.proof_context)
      }
      *)
      Definition verify_equality_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info ] =>
          ltac:(M.monadic
            (let account_info := M.alloc (| account_info |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::check_zk_token_proof_program_account",
                                []
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| 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.path
                                              "solana_zk_token_sdk::instruction::ciphertext_commitment_equality::CiphertextCommitmentEqualityProofContext";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  let context_state_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 (| account_info |),
                                "solana_program::account_info::AccountInfo",
                                "data"
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let equality_proof_context_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 "&")
                                    [
                                      Ty.apply
                                        (Ty.path
                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::ciphertext_commitment_equality::CiphertextCommitmentEqualityProofContext"
                                        ]
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_pod::bytemuck::pod_from_bytes",
                                  [
                                    Ty.apply
                                      (Ty.path
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::instruction::ciphertext_commitment_equality::CiphertextCommitmentEqualityProofContext"
                                      ]
                                  ]
                                |),
                                [
                                  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",
                                        []
                                      |),
                                      [ context_state_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.path
                                                "solana_zk_token_sdk::instruction::ciphertext_commitment_equality::CiphertextCommitmentEqualityProofContext";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| equality_proof_context_state |),
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                        "proof_type"
                                      |);
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::convert::Into",
                                            Ty.path "solana_zk_token_sdk::instruction::ProofType",
                                            [
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                            ],
                                            "into",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "solana_zk_token_sdk::instruction::ProofType::CiphertextCommitmentEquality"
                                              []
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::InvalidInstructionData"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| equality_proof_context_state |),
                            "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                            "proof_context"
                          |)
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn verify_ciphertext_validity_proof(
          account_info: &AccountInfo<'_>,
      ) -> Result<BatchedGroupedCiphertext2HandlesValidityProofContext, ProgramError> {
          check_zk_token_proof_program_account(account_info.owner)?;
          let context_state_account_data = account_info.data.borrow();
          let ciphertext_validity_proof_context_state = pod_from_bytes::<
              ProofContextState<BatchedGroupedCiphertext2HandlesValidityProofContext>,
          >(&context_state_account_data)?;
      
          if ciphertext_validity_proof_context_state.proof_type
              != ProofType::BatchedGroupedCiphertext2HandlesValidity.into()
          {
              return Err(ProgramError::InvalidInstructionData);
          }
      
          Ok(ciphertext_validity_proof_context_state.proof_context)
      }
      *)
      Definition verify_ciphertext_validity_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info ] =>
          ltac:(M.monadic
            (let account_info := M.alloc (| account_info |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::check_zk_token_proof_program_account",
                                []
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| 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.path
                                              "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  let context_state_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 (| account_info |),
                                "solana_program::account_info::AccountInfo",
                                "data"
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let ciphertext_validity_proof_context_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 "&")
                                    [
                                      Ty.apply
                                        (Ty.path
                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext"
                                        ]
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_pod::bytemuck::pod_from_bytes",
                                  [
                                    Ty.apply
                                      (Ty.path
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext"
                                      ]
                                  ]
                                |),
                                [
                                  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",
                                        []
                                      |),
                                      [ context_state_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.path
                                                "solana_zk_token_sdk::instruction::batched_grouped_ciphertext_validity::BatchedGroupedCiphertext2HandlesValidityProofContext";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| ciphertext_validity_proof_context_state |),
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                        "proof_type"
                                      |);
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::convert::Into",
                                            Ty.path "solana_zk_token_sdk::instruction::ProofType",
                                            [
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                            ],
                                            "into",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "solana_zk_token_sdk::instruction::ProofType::BatchedGroupedCiphertext2HandlesValidity"
                                              []
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::InvalidInstructionData"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| ciphertext_validity_proof_context_state |),
                            "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                            "proof_context"
                          |)
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn verify_transfer_range_proof(
          account_info: &AccountInfo<'_>,
      ) -> Result<BatchedRangeProofContext, ProgramError> {
          check_zk_token_proof_program_account(account_info.owner)?;
          let context_state_account_data = account_info.data.borrow();
          let range_proof_context_state =
              pod_from_bytes::<ProofContextState<BatchedRangeProofContext>>(&context_state_account_data)?;
      
          if range_proof_context_state.proof_type != ProofType::BatchedRangeProofU128.into() {
              return Err(ProgramError::InvalidInstructionData);
          }
      
          Ok(range_proof_context_state.proof_context)
      }
      *)
      Definition verify_transfer_range_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info ] =>
          ltac:(M.monadic
            (let account_info := M.alloc (| account_info |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::check_zk_token_proof_program_account",
                                []
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| 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.path
                                              "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  let context_state_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 (| account_info |),
                                "solana_program::account_info::AccountInfo",
                                "data"
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let range_proof_context_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 "&")
                                    [
                                      Ty.apply
                                        (Ty.path
                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext"
                                        ]
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_pod::bytemuck::pod_from_bytes",
                                  [
                                    Ty.apply
                                      (Ty.path
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext"
                                      ]
                                  ]
                                |),
                                [
                                  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",
                                        []
                                      |),
                                      [ context_state_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.path
                                                "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| range_proof_context_state |),
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                        "proof_type"
                                      |);
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::convert::Into",
                                            Ty.path "solana_zk_token_sdk::instruction::ProofType",
                                            [
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                            ],
                                            "into",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "solana_zk_token_sdk::instruction::ProofType::BatchedRangeProofU128"
                                              []
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::InvalidInstructionData"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| range_proof_context_state |),
                            "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                            "proof_context"
                          |)
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn verify_transfer_with_fee_range_proof(
          account_info: &AccountInfo<'_>,
      ) -> Result<BatchedRangeProofContext, ProgramError> {
          check_zk_token_proof_program_account(account_info.owner)?;
          let context_state_account_data = account_info.data.borrow();
          let range_proof_context_state =
              pod_from_bytes::<ProofContextState<BatchedRangeProofContext>>(&context_state_account_data)?;
      
          if range_proof_context_state.proof_type != ProofType::BatchedRangeProofU256.into() {
              return Err(ProgramError::InvalidInstructionData);
          }
      
          Ok(range_proof_context_state.proof_context)
      }
      *)
      Definition verify_transfer_with_fee_range_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info ] =>
          ltac:(M.monadic
            (let account_info := M.alloc (| account_info |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::check_zk_token_proof_program_account",
                                []
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| 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.path
                                              "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  let context_state_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 (| account_info |),
                                "solana_program::account_info::AccountInfo",
                                "data"
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let range_proof_context_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 "&")
                                    [
                                      Ty.apply
                                        (Ty.path
                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext"
                                        ]
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_pod::bytemuck::pod_from_bytes",
                                  [
                                    Ty.apply
                                      (Ty.path
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext"
                                      ]
                                  ]
                                |),
                                [
                                  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",
                                        []
                                      |),
                                      [ context_state_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.path
                                                "solana_zk_token_sdk::instruction::batched_range_proof::BatchedRangeProofContext";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| range_proof_context_state |),
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                        "proof_type"
                                      |);
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::convert::Into",
                                            Ty.path "solana_zk_token_sdk::instruction::ProofType",
                                            [
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                            ],
                                            "into",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "solana_zk_token_sdk::instruction::ProofType::BatchedRangeProofU256"
                                              []
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::InvalidInstructionData"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| range_proof_context_state |),
                            "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                            "proof_context"
                          |)
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
      
      (*
      fn verify_fee_sigma_proof(
          account_info: &AccountInfo<'_>,
      ) -> Result<FeeSigmaProofContext, ProgramError> {
          check_zk_token_proof_program_account(account_info.owner)?;
          let context_state_account_data = account_info.data.borrow();
          let fee_sigma_proof_context_state =
              pod_from_bytes::<ProofContextState<FeeSigmaProofContext>>(&context_state_account_data)?;
      
          if fee_sigma_proof_context_state.proof_type != ProofType::FeeSigma.into() {
              return Err(ProgramError::InvalidInstructionData);
          }
      
          Ok(fee_sigma_proof_context_state.proof_context)
      }
      *)
      Definition verify_fee_sigma_proof (τ : list Ty.t) (α : list Value.t) : M :=
        match τ, α with
        | [], [ account_info ] =>
          ltac:(M.monadic
            (let account_info := M.alloc (| account_info |) in
            M.catch_return (|
              ltac:(M.monadic
                (M.read (|
                  let _ :=
                    M.match_operator (|
                      M.alloc (|
                        M.call_closure (|
                          M.get_trait_method (|
                            "core::ops::try_trait::Try",
                            Ty.apply
                              (Ty.path "core::result::Result")
                              [ Ty.tuple []; Ty.path "solana_program::program_error::ProgramError"
                              ],
                            [],
                            "branch",
                            []
                          |),
                          [
                            M.call_closure (|
                              M.get_function (|
                                "spl_token_2022::check_zk_token_proof_program_account",
                                []
                              |),
                              [
                                M.read (|
                                  M.SubPointer.get_struct_record_field (|
                                    M.read (| 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.path
                                              "solana_zk_token_sdk::instruction::fee_sigma::FeeSigmaProofContext";
                                            Ty.path "solana_program::program_error::ProgramError"
                                          ],
                                        [
                                          Ty.apply
                                            (Ty.path "core::result::Result")
                                            [
                                              Ty.path "core::convert::Infallible";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ]
                                        ],
                                        "from_residual",
                                        []
                                      |),
                                      [ M.read (| residual |) ]
                                    |)
                                  |)
                                |)
                              |)
                            |)));
                        fun γ =>
                          ltac:(M.monadic
                            (let γ0_0 :=
                              M.SubPointer.get_struct_tuple_field (|
                                γ,
                                "core::ops::control_flow::ControlFlow::Continue",
                                0
                              |) in
                            let val := M.copy (| γ0_0 |) in
                            val))
                      ]
                    |) in
                  let context_state_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 (| account_info |),
                                "solana_program::account_info::AccountInfo",
                                "data"
                              |)
                            ]
                          |)
                        ]
                      |)
                    |) in
                  let fee_sigma_proof_context_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 "&")
                                    [
                                      Ty.apply
                                        (Ty.path
                                          "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                        [
                                          Ty.path
                                            "solana_zk_token_sdk::instruction::fee_sigma::FeeSigmaProofContext"
                                        ]
                                    ];
                                  Ty.path "solana_program::program_error::ProgramError"
                                ],
                              [],
                              "branch",
                              []
                            |),
                            [
                              M.call_closure (|
                                M.get_function (|
                                  "spl_pod::bytemuck::pod_from_bytes",
                                  [
                                    Ty.apply
                                      (Ty.path
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState")
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::instruction::fee_sigma::FeeSigmaProofContext"
                                      ]
                                  ]
                                |),
                                [
                                  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",
                                        []
                                      |),
                                      [ context_state_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.path
                                                "solana_zk_token_sdk::instruction::fee_sigma::FeeSigmaProofContext";
                                              Ty.path "solana_program::program_error::ProgramError"
                                            ],
                                          [
                                            Ty.apply
                                              (Ty.path "core::result::Result")
                                              [
                                                Ty.path "core::convert::Infallible";
                                                Ty.path
                                                  "solana_program::program_error::ProgramError"
                                              ]
                                          ],
                                          "from_residual",
                                          []
                                        |),
                                        [ M.read (| residual |) ]
                                      |)
                                    |)
                                  |)
                                |)
                              |)));
                          fun γ =>
                            ltac:(M.monadic
                              (let γ0_0 :=
                                M.SubPointer.get_struct_tuple_field (|
                                  γ,
                                  "core::ops::control_flow::ControlFlow::Continue",
                                  0
                                |) in
                              let val := M.copy (| γ0_0 |) in
                              val))
                        ]
                      |)
                    |) in
                  let _ :=
                    M.match_operator (|
                      M.alloc (| Value.Tuple [] |),
                      [
                        fun γ =>
                          ltac:(M.monadic
                            (let γ :=
                              M.use
                                (M.alloc (|
                                  M.call_closure (|
                                    M.get_trait_method (|
                                      "core::cmp::PartialEq",
                                      Ty.path
                                        "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType",
                                      [
                                        Ty.path
                                          "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                      ],
                                      "ne",
                                      []
                                    |),
                                    [
                                      M.SubPointer.get_struct_record_field (|
                                        M.read (| fee_sigma_proof_context_state |),
                                        "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                                        "proof_type"
                                      |);
                                      M.alloc (|
                                        M.call_closure (|
                                          M.get_trait_method (|
                                            "core::convert::Into",
                                            Ty.path "solana_zk_token_sdk::instruction::ProofType",
                                            [
                                              Ty.path
                                                "solana_zk_token_sdk::zk_token_elgamal::pod::PodProofType"
                                            ],
                                            "into",
                                            []
                                          |),
                                          [
                                            Value.StructTuple
                                              "solana_zk_token_sdk::instruction::ProofType::FeeSigma"
                                              []
                                          ]
                                        |)
                                      |)
                                    ]
                                  |)
                                |)) 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::InvalidInstructionData"
                                          []
                                      ]
                                  |)
                                |)
                              |)
                            |)));
                        fun γ => ltac:(M.monadic (M.alloc (| Value.Tuple [] |)))
                      ]
                    |) in
                  M.alloc (|
                    Value.StructTuple
                      "core::result::Result::Ok"
                      [
                        M.read (|
                          M.SubPointer.get_struct_record_field (|
                            M.read (| fee_sigma_proof_context_state |),
                            "solana_zk_token_sdk::zk_token_proof_state::ProofContextState",
                            "proof_context"
                          |)
                        |)
                      ]
                  |)
                |)))
            |)))
        | _, _ => M.impossible
        end.
    End verify_proof.
  End confidential_transfer.
End extension.
