comparator
qsort_s(matches + 1, i, sizeof(matches[0]), comparator,
static int comparator(const void *, const void *, void *);