X86-64 monkeypatching

This is all completely untested, of course.