Sort These Cards, Robot!

Today's challenge is this: I've shuffled this deck of cards. I wonder if you can put the cards back in sorted order?

Hah. That's easy. Any fool can put a deck of cards in order!

Ah, but do you think you could tell this fool how to do it?