x86: mpparse: clean up code by introducing a few helper functions, fix