[unroll] Update the new analysis logic from r228265 to use modern coding