* Replace ATE_LOOP_COUNT by its 2-NAF * Add constant references * Apply suggestions from code review Co-authored-by: Weikeng Chen <w.k@berkeley.edu>