To get an example of what can be done at the lowest level, see http://zsmith.co/intel.html for the instructions that a Pentium chip accepts. In particular look at http://zsmith.co/intel_j.html and http://zsmith.co/intel_l.html#loop.