Reverse engineer and add LUT lookup for CQMs