[PATCH 7/9] perf tools: Modularize main decoder function