[PATCH 2/5] stats: Reorder functions in stats.c