C Program which implements the same functionality as mystery.s (assembly program)