code: func (a *Automaton) step(state, label int) int {
  	assert(state >= 0)
  	assert(label >= 0)
  	if 2*state >= len(a.states) {
  		return -1 // invalid state
  	}
  	trans := a.states[2*state]
  	limit := trans + 3*a.states[2*state+1]
  	// TODO binary search
  	for trans < limit {
  		dest, min, max := a.transitions[trans], a.transitions[trans+1], a.transitions[trans+2]
  		if min <= label && label <= max {
  			return dest
  		}
  		trans += 3
  	}
  	return -1
  }
docs: /* Performs lookup in transitions, assuming determinism. */