/* Generated by re2c */
#line 1 "encodings/unicode_group_Sc_x.re"
// re2c $INPUT -o $OUTPUT -x
#include <stdint.h>
#include <stdio.h>
#include "utf16.h"
#define YYCTYPE uint16_t

bool scan(const YYCTYPE* start, const YYCTYPE* const limit) {
	__attribute__((unused)) const YYCTYPE* YYMARKER;
#define YYCURSOR start
Sc:

#line 15 "encodings/unicode_group_Sc_x.c"
{
	YYCTYPE yych;
	yych = *YYCURSOR;
	if (yych <= 0x17DA) {
		if (yych <= 0x07FF) {
			if (yych <= 0x058E) {
				if (yych <= '$') {
					if (yych >= '$') goto yy3;
				} else {
					if (yych <= 0x00A1) goto yy1;
					if (yych <= 0x00A5) goto yy3;
				}
			} else {
				if (yych <= 0x060A) {
					if (yych <= 0x058F) goto yy3;
				} else {
					if (yych <= 0x060B) goto yy3;
					if (yych >= 0x07FE) goto yy3;
				}
			}
		} else {
			if (yych <= 0x0AF0) {
				if (yych <= 0x09F3) {
					if (yych >= 0x09F2) goto yy3;
				} else {
					if (yych == 0x09FB) goto yy3;
				}
			} else {
				if (yych <= 0x0BF9) {
					if (yych <= 0x0AF1) goto yy3;
					if (yych >= 0x0BF9) goto yy3;
				} else {
					if (yych == 0x0E3F) goto yy3;
				}
			}
		}
	} else {
		if (yych <= 0xD83B) {
			if (yych <= 0xA838) {
				if (yych <= 0x209F) {
					if (yych <= 0x17DB) goto yy3;
				} else {
					if (yych <= 0x20C1) goto yy3;
					if (yych >= 0xA838) goto yy3;
				}
			} else {
				if (yych <= 0xD837) {
					if (yych == 0xD807) goto yy4;
				} else {
					if (yych <= 0xD838) goto yy5;
					if (yych >= 0xD83B) goto yy6;
				}
			}
		} else {
			if (yych <= 0xFF03) {
				if (yych <= 0xFDFC) {
					if (yych >= 0xFDFC) goto yy3;
				} else {
					if (yych == 0xFE69) goto yy3;
				}
			} else {
				if (yych <= 0xFFE1) {
					if (yych <= 0xFF04) goto yy3;
					if (yych >= 0xFFE0) goto yy3;
				} else {
					if (yych <= 0xFFE4) goto yy1;
					if (yych <= 0xFFE6) goto yy3;
				}
			}
		}
	}
yy1:
	++YYCURSOR;
yy2:
#line 15 "encodings/unicode_group_Sc_x.re"
	{ return YYCURSOR - 1 == limit; }
#line 92 "encodings/unicode_group_Sc_x.c"
yy3:
	++YYCURSOR;
#line 14 "encodings/unicode_group_Sc_x.re"
	{ goto Sc; }
#line 97 "encodings/unicode_group_Sc_x.c"
yy4:
	yych = *++YYCURSOR;
	if (yych <= 0xDFDC) goto yy2;
	if (yych <= 0xDFE0) goto yy3;
	goto yy2;
yy5:
	yych = *++YYCURSOR;
	if (yych == 0xDEFF) goto yy3;
	goto yy2;
yy6:
	yych = *++YYCURSOR;
	if (yych == 0xDCB0) goto yy3;
	goto yy2;
}
#line 16 "encodings/unicode_group_Sc_x.re"

}

static const uint32_t chars_Sc[] = {0x24,0x24,0xa2,0xa5,0x58f,0x58f,0x60b,0x60b,0x7fe,0x7ff,0x9f2,0x9f3,0x9fb,0x9fb,0xaf1,0xaf1,0xbf9,0xbf9,0xe3f,0xe3f,0x17db,0x17db,0x20a0,0x20c1,0xa838,0xa838,0xfdfc,0xfdfc,0xfe69,0xfe69,0xff04,0xff04,0xffe0,0xffe1,0xffe5,0xffe6,0x11fdd,0x11fe0,0x1e2ff,0x1e2ff,0x1ecb0,0x1ecb0,};

static uint32_t encode_utf16(const uint32_t* ranges, uint32_t ranges_count, uint16_t* s) {
	uint16_t* const s0 = s;
	for (uint32_t i = 0; i < ranges_count; i += 2)
		for (uint32_t j = ranges[i]; j <= ranges[i + 1]; ++j)
			if (j <= re2c::utf16::MAX_1WORD_RUNE) {
				*s++ = j;
			} else {
				*s++ = re2c::utf16::lead_surr(j);
				*s++ = re2c::utf16::trail_surr(j);
			}
	for (uint32_t i = 0; i < 2; ++i) s[i] = 0;
	return s - s0;
}

int main() {
	YYCTYPE* buffer_Sc = new YYCTYPE[130];
	uint32_t buffer_Sc_len = encode_utf16(chars_Sc, sizeof(chars_Sc) / sizeof(uint32_t), buffer_Sc);
	if (!scan(buffer_Sc, buffer_Sc + buffer_Sc_len)) printf("test 'Sc' failed\n");
	delete[] buffer_Sc;
	return 0;
}
