XRevert "Revert "Add IntCast""

This reverts commit 34e3b796ace79c2250e1f552114a5982efe355ed.