Arista Networks interview question

Had me look at some code and state what each function does. Somewhat clever bit manipulation problems.