Convert rarch_phaser to C