Advisor wants to be the first author
In my experience, in CS, it is rare but not unheard of for a professor to be first author.  Usually I think that is really when it is the professor who has taken lead, both in running a project and in writing the text, and typically it is when it is a group project where each student has a moderate contribution but it's the advisor who pulled it together.  This is often the case when the paper is an overview of the project as a whole.

In the case of your project, it certainly sounds like you're getting a raw deal and should push back.  But without seeing the professor's side of the story, it can be hard to tell.  They may have a different view of the relative contribution. 

IMHO, even if it's 50-50 or 60-40, the student should get priority.  There's a tipping point where it's more understandable, but from your description, you're nowhere close to it.  

Good luck!