/* This could be made more efficient with a binary search on a presorted list, if necessary  */
static int find_alternatives_list(u64 event)
/* This could be made more efficient with a binary search on a presorted list, if necessary  */
static int find_alternatives_list(u64 event)
{
	int i, j;
	unsigned int alt;
	for (i = 0; i < ARRAY_SIZE(event_alternatives); ++i) {
		if (event < event_alternatives[i][0])
			return -1;
		for (j = 0; j < MAX_ALT; ++j) {
			alt = event_alternatives[i][j];
			if (!alt || event < alt)
				break;
			if (event == alt)
				return i;
		}
	}
	return -1;
}