add gen_twifs.c