rem: PRINT(("%s\n", __PRETTY_FUNCTION__));
context: r_or(long top, long bottom, BRegion *first, BRegion *second, BRegion *dest, long *indexA, long *indexB){	PRINT(("%s\n", __PRETTY_FUNCTION__));		int32 lefts[kMaxPoints];	int32 rights[kMaxPoints];		long i1 = *indexA;	long i2 = *indexB;		*indexA = -1;	*indexB = -1;		long foundCount = 0;	long x = 0;		// Store left and right points to the appropriate array	for (x = i1; x < first->count; x++) {				// Look if this rect can be used next time we are called, 		// thus correctly maintaining the "index" parameters.		if (first->data[x].bottom >= top && *indexA == -1)			*indexA = x;					if (first->data[x].top <= top && first->data[x].bottom >= bottom) {			lefts[foundCount] = first->data[x].left;			rights[foundCount] = first->data[x].right;			foundCount++;			} else if (first->data[x].top > bottom)			break;		}		if (*indexA == -1)		*indexA = i1;						for (x = i2; x < second->count; x++) {		if (second->data[x].bottom >= top && *indexB == -1)			*indexB = x;				if (second->data[x].top <= top && second->data[x].bottom >= bottom) {			lefts[foundCount] = second->data[x].left;			rights[foundCount] = second->data[x].right;			foundCount++;		} else if (second->data[x].top > bottom)			break;	}		if (*indexB == -1)		*indexB = i2;			if (foundCount > 1)		sort_trans(lefts, rights, foundCount);		ASSERT(foundCount > 0);		clipping_rect rect;	rect.top = top;	rect.bottom = bottom;		// Check if a rect intersects with the next one.	// If so, merge the two rects, if not, just add the rect.	long current = 0;	while (current < foundCount) {		long next = current + 1;				rect.left = lefts[current];		rect.right = rights[current];				while (next < foundCount && rect.right >= lefts[next]) {			if (rect.right < rights[next])				rect.right = rights[next];			next++;		}				dest->_AddRect(rect);				current = next;		}		}