Magic has nothing to do with understanding assembly. Magic simply is probably undocumented piece of code (they aren't even self-documenting), that in order to understand you have to ask the author about it. There's no magic if you understand the code right away, or by looking up some reference.
Re:Principles for C programming
by attractivechaos on Thursday March 16, 2017 @10:20AM
(#13885195)
> "Magic" becomes obvious common-sense once you understand.
I fully agree. Packing data into a binary array, popcount with bit fiddling, macros for generics, etc may seem "magic" to some, but they can be useful especially in performance-critical code. Once you understand these "magic", they are just some common pieces in your toolbox. C is a simple language. Learning C plus such "magic" still takes much less time than grasping the entire C++.
IMHO if you want to become an expert in C and C++, you must be able to read Asm and understand what the machine is actually doing.
A very relevant article on this same idea: http://www.linusakesson.net/programming/kernighans-lever/