The first &
on the function declaration causes PHP to return a reference. The &
on $post
makes changes to the actual variable that you pass into the function.
It's actually unclear to me why either of these (the reference declarations) are used. It seems to me to be an incorrect attempt at optimization on Wordpress' part, or it is more likely for compatibility with PHP 4. I think you can just ignore the ampersands for your purposes.