Use a jump table for TSP entrypoints v2

Rebased version of #97