purak's x86-64 hacks