Handle pattern [0]:
int ctz(unsigned int a)
{
int c = __clz(a & -a); return a ? 31 - c : c;
}
In reality, the compiler can generate much better code for cttz, so fold away this pattern.
[0] https://community.arm.com/community-help/f/discussions/2114/count-trailing-zeros