Convert rarch_wah to C