x86: Rewrite ret_from_fork() in C