d3dx9_36: Simplify the computation of a 2-adic valuation