Ported mutton_demo to C.