Add C implementation of call_dm.
Added C implementation of opp_dmode.
Refine it from the x86_64 assembly implementation.
Clean up and minor style improvement.