ifstate_create
newstate = ifstate_create(ifstate, p, startstate);
ifstate = ifstate_create(NULL, NULL, true);