Refactor rep_process_syscall() to be more data-oriented, to simplify upcoming inversion of control flow.