Div with mul

Replace division by constants with multiplication, additions, shifts.