MAX_THREADS
if (nthreads > MAX_THREADS)
nthreads = MAX_THREADS;
pthread_t th[MAX_THREADS];
int th_args[MAX_THREADS], r, i, ch;