Homework 2 : Convert bunch of assembly code snippets to C