Create sortBrainstateTotal.c