small optimization for scalar genmask
adding muls(valmin, valmin) to muls tests
optimizing divs function