Adapting register allocation to Coqonut's monadic form.