The AdS4/CFT3 algebraic curve