transform (p_p_list_item -w target, p_list_item list)
    where (target :: *)      
{
  set_amount_pointer (p_list_item _)                
  {
    int a = list_item->containers[0]->amount;

    amount_ptr = &a; 
  }

  pint amount_ptr = .; set_amount_pointer (list);                              /*  "target variable is out of the scope" */

  ...

  if (...)
  {
    *amount_ptr ++;
  }

  ...

}