FIND_NEXT_MATCH_DOWN
state->match_direction = FIND_NEXT_MATCH_DOWN;
if (flag == FIND_NEXT_MATCH_DOWN)
if (*match_direction == FIND_NEXT_MATCH_DOWN)