Impressive (if somewhat intimidating) blog post showing how to reason from assembly back to the equivalent C code: https://kakaroto.homelinux.net/2017/11/introduction-to-reverse-engineering-and-assembly/