[c] refactor nodemap with locate table