Attempted to optimize code with loop unrolling, register keyword, moving the lookup table to be local, and splitting the cordic function into a vector and rotation version to avoid extra if checks