Optimize XTEA functions