util: Reorder the code generated function so that they are grouped by format.