Optimized code.
Added conditional branching instructions.