Infer IN width
Infer RSH width

I'm not sure this is done correctly, it certainly feels odd that the
right-shift instruction is actually a right-shift-and-mask.
Infer XOR width
Infer CAT width

This is another operation that I'm not sure about.  It appears that
the width parameter is actually the width of the last operand.  This
kind of makes sense (as essentially the cat is just a shift+or).