Code for testing HMM using C libraries