File madeline-0.1+git.1733505506.5c2abae.obscpio of Package madeline

07070100000000000081A4000000000000000000000001675331E2000001E4000000000000000000000000000000000000002C00000000madeline-0.1+git.1733505506.5c2abae/LICENSE            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                    Version 2, December 2004

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

 Everyone is permitted to copy and distribute verbatim or modified
 copies of this license document, and changing it is allowed as long
 as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. You just DO WHAT THE FUCK YOU WANT TO.

07070100000001000081A4000000000000000000000001675331E2000000DE000000000000000000000000000000000000002B00000000madeline-0.1+git.1733505506.5c2abae/READMEtiny readline-alike with some batteries included

various notes:
- if you've got a prompter that can run a command, you should set $MADELINE_MODE
  to made::modestr(s.mode)
- never set s.mode directly, always use set_mode
07070100000002000081A4000000000000000000000001675331E20000038F000000000000000000000000000000000000002F00000000madeline-0.1+git.1733505506.5c2abae/example.hause dirs;
use fmt;
use io;
use made;
use path;
use strings;

export fn main() void = {
	static let buf = path::buffer { ... };
	path::set(&buf, dirs::data("madeline"), "history")!;
	let hist = made::histfile(path::string(&buf))!;
	let ctx = made::context {
		complete = &made::complete_fs,
		hint = &made::hint_history,
		check_done = &made::always_done,
		hist = &hist,
		prompt = &made::prompt_string("$ "),
		split = made::split_sh,
		cfg = match (made::config_default("example")) {
		case let cfg: made::config =>
			yield cfg;
		case let e: made::error =>
			fmt::fatal(made::strerror(e));
		},
		...
	};
	defer made::config_free(ctx.cfg);
	defer made::ctx_finish(&ctx)!;

	for (true) match (made::line(&ctx)) {
	case io::EOF =>
		break;
	case void =>
		fmt::println("^C")!;
	case let s: str =>
		defer free(s);
		fmt::println("=>", s)!;
	case let e: made::error =>
		fmt::fatal(made::strerror(e));
	};
};
07070100000003000041ED000000000000000000000002675331E200000000000000000000000000000000000000000000002A00000000madeline-0.1+git.1733505506.5c2abae/graph07070100000004000081A4000000000000000000000001675331E2000007DF000000000000000000000000000000000000003600000000madeline-0.1+git.1733505506.5c2abae/graph/boundary.hause encoding::utf8;
use strings;

use fmt;

export fn boundary(buf: []u8, idx: size) (bool | utf8::invalid) = {
	if (buf[idx] >= 0x80 && (buf[idx] < 0xc2 || buf[idx] > 0xfd)) {
		// need to be at codepoint boundary
		return false;
	};
	let next = strings::iter(strings::fromutf8(buf[idx..])!);
	let next = match (strings::next(&next)) {
	case done =>
		// GB1
		return true;
	case let r: rune =>
		yield r;
	};
	let prev = strings::riter(strings::fromutf8(buf[..idx])?);
	let prev = match (strings::next(&prev)) {
	case done =>
		// GB2
		return true;
	case let r: rune =>
		yield r;
	};

	if (hasprop(prev, CR) && hasprop(next, LF)) return false; // GB3
	if (hasprop(prev, CONTROL | CR | LF)) return true; // GB4
	if (hasprop(next, CONTROL | CR | LF)) return true; // GB5
	if (hasprop(prev, L) && hasprop(next, L | V | LV | LVT)) {
		return false; // GB6
	};
	if (hasprop(prev, LV | V) && hasprop(next, V | T)) return false; // GB7
	if (hasprop(prev, LVT | T) && hasprop(next, T)) return false; // GB8
	if (hasprop(next, EXTEND | ZWJ)) return false; // GB9
	if (hasprop(next, SPACINGMARK)) return false; // GB9a
	if (hasprop(prev, PREPEND)) return false; // GB9b
	if (hasprop(prev, ZWJ) && hasprop(next, EXTENDED_PICTOGRAPHIC)) {
		let it = strings::riter(strings::fromutf8(buf[..idx])?);
		strings::next(&it) as rune;
		for (let r => strings::next(&it)) {
			if (!hasprop(r, EXTEND)) {
				if (hasprop(r, EXTENDED_PICTOGRAPHIC)) {
					return false; // GB11
				};
				break;
			};
		};
	};
	if (hasprop(prev, REGIONAL_INDICATOR)
			&& hasprop(next, REGIONAL_INDICATOR)) :regional {
		let it = strings::riter(strings::fromutf8(buf[..idx])?);
		strings::next(&it) as rune;
		for (let r => strings::next(&it)) {
			if (!hasprop(r, REGIONAL_INDICATOR)) {
				return false; // GB13
			};
			match (strings::next(&it)) {
			case done =>
				yield :regional;
			case let r: rune =>
				if (!hasprop(r, REGIONAL_INDICATOR)) {
					yield :regional;
				};
			};
		};
		return false; // GB12
	};
	return true; // GB999
};
07070100000005000081A4000000000000000000000001675331E200000F6B000000000000000000000000000000000000003700000000madeline-0.1+git.1733505506.5c2abae/graph/props+gen.hause bufio;
use encoding::utf8;
use fmt;
use fs;
use io;
use os;
use sort;
use strconv;
use strings;

type prop = enum u16 {
	CR = 1 << 0,
	CONTROL = 1 << 1,
	EXTEND = 1 << 2,
	EXTENDED_PICTOGRAPHIC = 1 << 3,
	L = 1 << 4,
	LF = 1 << 5,
	LV = 1 << 6,
	LVT = 1 << 7,
	PREPEND = 1 << 8,
	REGIONAL_INDICATOR = 1 << 9,
	SPACINGMARK = 1 << 10,
	T = 1 << 11,
	V = 1 << 12,
	ZWJ = 1 << 13,
};

const header = `
export type prop = u16;

export def CR: prop = 1 << 0;
export def CONTROL: prop = 1 << 1;
export def EXTEND: prop = 1 << 2;
export def EXTENDED_PICTOGRAPHIC: prop = 1 << 3;
export def L: prop = 1 << 4;
export def LF: prop = 1 << 5;
export def LV: prop = 1 << 6;
export def LVT: prop = 1 << 7;
export def PREPEND: prop = 1 << 8;
export def REGIONAL_INDICATOR: prop = 1 << 9;
export def SPACINGMARK: prop = 1 << 10;
export def T: prop = 1 << 11;
export def V: prop = 1 << 12;
export def ZWJ: prop = 1 << 13;

const props: [_](u32, prop) = [`;

const trailer = `];`;

fn handle(
	ranges: *[](u32, u32, prop),
	path: str,
) (void | fs::error | utf8::invalid | strconv::invalid | strconv::overflow) = {
	let f = os::open(path)?;
	defer io::close(f)!;
	for (true) match (bufio::read_line(f)?) {
	case io::EOF =>
		break;
	case let line: []u8 =>
		defer free(line);
		let line = strings::fromutf8(line)?;
		let line = strings::cut(line, "#").0;
		if (line == "") continue;
		let (range, prop) = strings::cut(line, ";");
		range = strings::trim(range);
		prop = strings::trim(prop);

		let (start, end) = strings::cut(range, "..");
		if (end == "") end = start;
		let start = strconv::stou32(start, strconv::base::HEX)?;
		let end = strconv::stou32(end, strconv::base::HEX)?;

		let prop = switch (prop) {
		case "CR" =>
			yield prop::CR;
		case "Control" =>
			yield prop::CONTROL;
		case "Extend" =>
			yield prop::EXTEND;
		case "Extended_Pictographic" =>
			yield prop::EXTENDED_PICTOGRAPHIC;
		case "L" =>
			yield prop::L;
		case "LF" =>
			yield prop::LF;
		case "LV" =>
			yield prop::LV;
		case "LVT" =>
			yield prop::LVT;
		case "Prepend" =>
			yield prop::PREPEND;
		case "Regional_Indicator" =>
			yield prop::REGIONAL_INDICATOR;
		case "SpacingMark" =>
			yield prop::SPACINGMARK;
		case "T" =>
			yield prop::T;
		case "V" =>
			yield prop::V;
		case "ZWJ" =>
			yield prop::ZWJ;
		case =>
			continue;
		};

		append(ranges, (start, end, prop));
	};
};

fn cmp(a: const *opaque, b: const *opaque) int = {
	const a = a: const *(u32, prop), b = b: const *(u32, prop);
	return if (a.0 < b.0) -1 else if (a.0 > b.0) 1 else 0;
};

export fn main() void = {
	let ranges: [](u32, u32, prop) = [];
	defer free(ranges);
	for (let i = 1z; i < len(os::args); i += 1) {
		match (handle(&ranges, os::args[i])) {
		case void => void;
		case utf8::invalid =>
			fmt::fatal("invalid utf8");
		case strconv::invalid =>
			fmt::fatal("invalid rune");
		case strconv::overflow =>
			fmt::fatal("invalid rune (overflow)");
		case let e: fs::error =>
			fmt::fatal(fs::strerror(e));
		};
	};

	let points: [](u32, prop) = [];
	defer free(points);
	append(points, (0, 0));
	for (let i = 0z; i < len(ranges); i += 1) {
		assert(ranges[i].0 <= ranges[i].1);
		append(points, (ranges[i].0, 0));
		append(points, (ranges[i].1 + 1, 0));
	};
	sort::sort(points, size((u32, prop)), &cmp);
	for (let i = 0z; i < len(ranges); i += 1) {
		for (let j = 0z; j < len(points); j += 1) {
			if (points[j].0 < ranges[i].0) continue;
			if (points[j].0 > ranges[i].1) continue;
			points[j].1 |= ranges[i].2;
		};
	};
	for (let i = 1z; i < len(points); i += 1) {
		if (points[i].1 == points[i - 1].1) {
			delete(points[i]);
			i -= 1;
		};
	};

	fmt::print("// generated by props+gen.ha")!;
	for (let i = 1z; i < len(os::args); i += 1) {
		fmt::print("", os::args[i])!;
	};
	fmt::println()!;
	fmt::println(header)!;
	for (let i = 0z; i < len(points); i += 1) {
		fmt::printfln("\t(0x{:.8x}, 0b{:.16b}),",
			points[i].0, points[i].1: uint)!;
	};
	fmt::println(trailer)!;
};
07070100000006000081A4000000000000000000000001675331E2000101FF000000000000000000000000000000000000003300000000madeline-0.1+git.1733505506.5c2abae/graph/props.ha// generated by props+gen.ha /usr/share/unicode/emoji/emoji-data.txt /usr/share/unicode/auxiliary/GraphemeBreakProperty.txt

export type prop = u16;

export def CR: prop = 1 << 0;
export def CONTROL: prop = 1 << 1;
export def EXTEND: prop = 1 << 2;
export def EXTENDED_PICTOGRAPHIC: prop = 1 << 3;
export def L: prop = 1 << 4;
export def LF: prop = 1 << 5;
export def LV: prop = 1 << 6;
export def LVT: prop = 1 << 7;
export def PREPEND: prop = 1 << 8;
export def REGIONAL_INDICATOR: prop = 1 << 9;
export def SPACINGMARK: prop = 1 << 10;
export def T: prop = 1 << 11;
export def V: prop = 1 << 12;
export def ZWJ: prop = 1 << 13;

const props: [_](u32, prop) = [
	(0x00000000, 0b0000000000000010),
	(0x0000000a, 0b0000000000100000),
	(0x0000000b, 0b0000000000000010),
	(0x0000000d, 0b0000000000000001),
	(0x0000000e, 0b0000000000000010),
	(0x00000020, 0b0000000000000000),
	(0x0000007f, 0b0000000000000010),
	(0x000000a0, 0b0000000000000000),
	(0x000000a9, 0b0000000000001000),
	(0x000000aa, 0b0000000000000000),
	(0x000000ad, 0b0000000000000010),
	(0x000000ae, 0b0000000000001000),
	(0x000000af, 0b0000000000000000),
	(0x00000300, 0b0000000000000100),
	(0x00000370, 0b0000000000000000),
	(0x00000483, 0b0000000000000100),
	(0x0000048a, 0b0000000000000000),
	(0x00000591, 0b0000000000000100),
	(0x000005be, 0b0000000000000000),
	(0x000005bf, 0b0000000000000100),
	(0x000005c0, 0b0000000000000000),
	(0x000005c1, 0b0000000000000100),
	(0x000005c3, 0b0000000000000000),
	(0x000005c4, 0b0000000000000100),
	(0x000005c6, 0b0000000000000000),
	(0x000005c7, 0b0000000000000100),
	(0x000005c8, 0b0000000000000000),
	(0x00000600, 0b0000000100000000),
	(0x00000606, 0b0000000000000000),
	(0x00000610, 0b0000000000000100),
	(0x0000061b, 0b0000000000000000),
	(0x0000061c, 0b0000000000000010),
	(0x0000061d, 0b0000000000000000),
	(0x0000064b, 0b0000000000000100),
	(0x00000660, 0b0000000000000000),
	(0x00000670, 0b0000000000000100),
	(0x00000671, 0b0000000000000000),
	(0x000006d6, 0b0000000000000100),
	(0x000006dd, 0b0000000100000000),
	(0x000006de, 0b0000000000000000),
	(0x000006df, 0b0000000000000100),
	(0x000006e5, 0b0000000000000000),
	(0x000006e7, 0b0000000000000100),
	(0x000006e9, 0b0000000000000000),
	(0x000006ea, 0b0000000000000100),
	(0x000006ee, 0b0000000000000000),
	(0x0000070f, 0b0000000100000000),
	(0x00000710, 0b0000000000000000),
	(0x00000711, 0b0000000000000100),
	(0x00000712, 0b0000000000000000),
	(0x00000730, 0b0000000000000100),
	(0x0000074b, 0b0000000000000000),
	(0x000007a6, 0b0000000000000100),
	(0x000007b1, 0b0000000000000000),
	(0x000007eb, 0b0000000000000100),
	(0x000007f4, 0b0000000000000000),
	(0x000007fd, 0b0000000000000100),
	(0x000007fe, 0b0000000000000000),
	(0x00000816, 0b0000000000000100),
	(0x0000081a, 0b0000000000000000),
	(0x0000081b, 0b0000000000000100),
	(0x00000824, 0b0000000000000000),
	(0x00000825, 0b0000000000000100),
	(0x00000828, 0b0000000000000000),
	(0x00000829, 0b0000000000000100),
	(0x0000082e, 0b0000000000000000),
	(0x00000859, 0b0000000000000100),
	(0x0000085c, 0b0000000000000000),
	(0x00000890, 0b0000000100000000),
	(0x00000892, 0b0000000000000000),
	(0x00000897, 0b0000000000000100),
	(0x000008a0, 0b0000000000000000),
	(0x000008ca, 0b0000000000000100),
	(0x000008e2, 0b0000000100000000),
	(0x000008e3, 0b0000000000000100),
	(0x00000903, 0b0000010000000000),
	(0x00000904, 0b0000000000000000),
	(0x0000093a, 0b0000000000000100),
	(0x0000093b, 0b0000010000000000),
	(0x0000093c, 0b0000000000000100),
	(0x0000093d, 0b0000000000000000),
	(0x0000093e, 0b0000010000000000),
	(0x00000941, 0b0000000000000100),
	(0x00000949, 0b0000010000000000),
	(0x0000094d, 0b0000000000000100),
	(0x0000094e, 0b0000010000000000),
	(0x00000950, 0b0000000000000000),
	(0x00000951, 0b0000000000000100),
	(0x00000958, 0b0000000000000000),
	(0x00000962, 0b0000000000000100),
	(0x00000964, 0b0000000000000000),
	(0x00000981, 0b0000000000000100),
	(0x00000982, 0b0000010000000000),
	(0x00000984, 0b0000000000000000),
	(0x000009bc, 0b0000000000000100),
	(0x000009bd, 0b0000000000000000),
	(0x000009be, 0b0000000000000100),
	(0x000009bf, 0b0000010000000000),
	(0x000009c1, 0b0000000000000100),
	(0x000009c5, 0b0000000000000000),
	(0x000009c7, 0b0000010000000000),
	(0x000009c9, 0b0000000000000000),
	(0x000009cb, 0b0000010000000000),
	(0x000009cd, 0b0000000000000100),
	(0x000009ce, 0b0000000000000000),
	(0x000009d7, 0b0000000000000100),
	(0x000009d8, 0b0000000000000000),
	(0x000009e2, 0b0000000000000100),
	(0x000009e4, 0b0000000000000000),
	(0x000009fe, 0b0000000000000100),
	(0x000009ff, 0b0000000000000000),
	(0x00000a01, 0b0000000000000100),
	(0x00000a03, 0b0000010000000000),
	(0x00000a04, 0b0000000000000000),
	(0x00000a3c, 0b0000000000000100),
	(0x00000a3d, 0b0000000000000000),
	(0x00000a3e, 0b0000010000000000),
	(0x00000a41, 0b0000000000000100),
	(0x00000a43, 0b0000000000000000),
	(0x00000a47, 0b0000000000000100),
	(0x00000a49, 0b0000000000000000),
	(0x00000a4b, 0b0000000000000100),
	(0x00000a4e, 0b0000000000000000),
	(0x00000a51, 0b0000000000000100),
	(0x00000a52, 0b0000000000000000),
	(0x00000a70, 0b0000000000000100),
	(0x00000a72, 0b0000000000000000),
	(0x00000a75, 0b0000000000000100),
	(0x00000a76, 0b0000000000000000),
	(0x00000a81, 0b0000000000000100),
	(0x00000a83, 0b0000010000000000),
	(0x00000a84, 0b0000000000000000),
	(0x00000abc, 0b0000000000000100),
	(0x00000abd, 0b0000000000000000),
	(0x00000abe, 0b0000010000000000),
	(0x00000ac1, 0b0000000000000100),
	(0x00000ac6, 0b0000000000000000),
	(0x00000ac7, 0b0000000000000100),
	(0x00000ac9, 0b0000010000000000),
	(0x00000aca, 0b0000000000000000),
	(0x00000acb, 0b0000010000000000),
	(0x00000acd, 0b0000000000000100),
	(0x00000ace, 0b0000000000000000),
	(0x00000ae2, 0b0000000000000100),
	(0x00000ae4, 0b0000000000000000),
	(0x00000afa, 0b0000000000000100),
	(0x00000b00, 0b0000000000000000),
	(0x00000b01, 0b0000000000000100),
	(0x00000b02, 0b0000010000000000),
	(0x00000b04, 0b0000000000000000),
	(0x00000b3c, 0b0000000000000100),
	(0x00000b3d, 0b0000000000000000),
	(0x00000b3e, 0b0000000000000100),
	(0x00000b40, 0b0000010000000000),
	(0x00000b41, 0b0000000000000100),
	(0x00000b45, 0b0000000000000000),
	(0x00000b47, 0b0000010000000000),
	(0x00000b49, 0b0000000000000000),
	(0x00000b4b, 0b0000010000000000),
	(0x00000b4d, 0b0000000000000100),
	(0x00000b4e, 0b0000000000000000),
	(0x00000b55, 0b0000000000000100),
	(0x00000b58, 0b0000000000000000),
	(0x00000b62, 0b0000000000000100),
	(0x00000b64, 0b0000000000000000),
	(0x00000b82, 0b0000000000000100),
	(0x00000b83, 0b0000000000000000),
	(0x00000bbe, 0b0000000000000100),
	(0x00000bbf, 0b0000010000000000),
	(0x00000bc0, 0b0000000000000100),
	(0x00000bc1, 0b0000010000000000),
	(0x00000bc3, 0b0000000000000000),
	(0x00000bc6, 0b0000010000000000),
	(0x00000bc9, 0b0000000000000000),
	(0x00000bca, 0b0000010000000000),
	(0x00000bcd, 0b0000000000000100),
	(0x00000bce, 0b0000000000000000),
	(0x00000bd7, 0b0000000000000100),
	(0x00000bd8, 0b0000000000000000),
	(0x00000c00, 0b0000000000000100),
	(0x00000c01, 0b0000010000000000),
	(0x00000c04, 0b0000000000000100),
	(0x00000c05, 0b0000000000000000),
	(0x00000c3c, 0b0000000000000100),
	(0x00000c3d, 0b0000000000000000),
	(0x00000c3e, 0b0000000000000100),
	(0x00000c41, 0b0000010000000000),
	(0x00000c45, 0b0000000000000000),
	(0x00000c46, 0b0000000000000100),
	(0x00000c49, 0b0000000000000000),
	(0x00000c4a, 0b0000000000000100),
	(0x00000c4e, 0b0000000000000000),
	(0x00000c55, 0b0000000000000100),
	(0x00000c57, 0b0000000000000000),
	(0x00000c62, 0b0000000000000100),
	(0x00000c64, 0b0000000000000000),
	(0x00000c81, 0b0000000000000100),
	(0x00000c82, 0b0000010000000000),
	(0x00000c84, 0b0000000000000000),
	(0x00000cbc, 0b0000000000000100),
	(0x00000cbd, 0b0000000000000000),
	(0x00000cbe, 0b0000010000000000),
	(0x00000cbf, 0b0000000000000100),
	(0x00000cc1, 0b0000010000000000),
	(0x00000cc2, 0b0000000000000100),
	(0x00000cc3, 0b0000010000000000),
	(0x00000cc5, 0b0000000000000000),
	(0x00000cc6, 0b0000000000000100),
	(0x00000cc9, 0b0000000000000000),
	(0x00000cca, 0b0000000000000100),
	(0x00000cce, 0b0000000000000000),
	(0x00000cd5, 0b0000000000000100),
	(0x00000cd7, 0b0000000000000000),
	(0x00000ce2, 0b0000000000000100),
	(0x00000ce4, 0b0000000000000000),
	(0x00000cf3, 0b0000010000000000),
	(0x00000cf4, 0b0000000000000000),
	(0x00000d00, 0b0000000000000100),
	(0x00000d02, 0b0000010000000000),
	(0x00000d04, 0b0000000000000000),
	(0x00000d3b, 0b0000000000000100),
	(0x00000d3d, 0b0000000000000000),
	(0x00000d3e, 0b0000000000000100),
	(0x00000d3f, 0b0000010000000000),
	(0x00000d41, 0b0000000000000100),
	(0x00000d45, 0b0000000000000000),
	(0x00000d46, 0b0000010000000000),
	(0x00000d49, 0b0000000000000000),
	(0x00000d4a, 0b0000010000000000),
	(0x00000d4d, 0b0000000000000100),
	(0x00000d4e, 0b0000000100000000),
	(0x00000d4f, 0b0000000000000000),
	(0x00000d57, 0b0000000000000100),
	(0x00000d58, 0b0000000000000000),
	(0x00000d62, 0b0000000000000100),
	(0x00000d64, 0b0000000000000000),
	(0x00000d81, 0b0000000000000100),
	(0x00000d82, 0b0000010000000000),
	(0x00000d84, 0b0000000000000000),
	(0x00000dca, 0b0000000000000100),
	(0x00000dcb, 0b0000000000000000),
	(0x00000dcf, 0b0000000000000100),
	(0x00000dd0, 0b0000010000000000),
	(0x00000dd2, 0b0000000000000100),
	(0x00000dd5, 0b0000000000000000),
	(0x00000dd6, 0b0000000000000100),
	(0x00000dd7, 0b0000000000000000),
	(0x00000dd8, 0b0000010000000000),
	(0x00000ddf, 0b0000000000000100),
	(0x00000de0, 0b0000000000000000),
	(0x00000df2, 0b0000010000000000),
	(0x00000df4, 0b0000000000000000),
	(0x00000e31, 0b0000000000000100),
	(0x00000e32, 0b0000000000000000),
	(0x00000e33, 0b0000010000000000),
	(0x00000e34, 0b0000000000000100),
	(0x00000e3b, 0b0000000000000000),
	(0x00000e47, 0b0000000000000100),
	(0x00000e4f, 0b0000000000000000),
	(0x00000eb1, 0b0000000000000100),
	(0x00000eb2, 0b0000000000000000),
	(0x00000eb3, 0b0000010000000000),
	(0x00000eb4, 0b0000000000000100),
	(0x00000ebd, 0b0000000000000000),
	(0x00000ec8, 0b0000000000000100),
	(0x00000ecf, 0b0000000000000000),
	(0x00000f18, 0b0000000000000100),
	(0x00000f1a, 0b0000000000000000),
	(0x00000f35, 0b0000000000000100),
	(0x00000f36, 0b0000000000000000),
	(0x00000f37, 0b0000000000000100),
	(0x00000f38, 0b0000000000000000),
	(0x00000f39, 0b0000000000000100),
	(0x00000f3a, 0b0000000000000000),
	(0x00000f3e, 0b0000010000000000),
	(0x00000f40, 0b0000000000000000),
	(0x00000f71, 0b0000000000000100),
	(0x00000f7f, 0b0000010000000000),
	(0x00000f80, 0b0000000000000100),
	(0x00000f85, 0b0000000000000000),
	(0x00000f86, 0b0000000000000100),
	(0x00000f88, 0b0000000000000000),
	(0x00000f8d, 0b0000000000000100),
	(0x00000f98, 0b0000000000000000),
	(0x00000f99, 0b0000000000000100),
	(0x00000fbd, 0b0000000000000000),
	(0x00000fc6, 0b0000000000000100),
	(0x00000fc7, 0b0000000000000000),
	(0x0000102d, 0b0000000000000100),
	(0x00001031, 0b0000010000000000),
	(0x00001032, 0b0000000000000100),
	(0x00001038, 0b0000000000000000),
	(0x00001039, 0b0000000000000100),
	(0x0000103b, 0b0000010000000000),
	(0x0000103d, 0b0000000000000100),
	(0x0000103f, 0b0000000000000000),
	(0x00001056, 0b0000010000000000),
	(0x00001058, 0b0000000000000100),
	(0x0000105a, 0b0000000000000000),
	(0x0000105e, 0b0000000000000100),
	(0x00001061, 0b0000000000000000),
	(0x00001071, 0b0000000000000100),
	(0x00001075, 0b0000000000000000),
	(0x00001082, 0b0000000000000100),
	(0x00001083, 0b0000000000000000),
	(0x00001084, 0b0000010000000000),
	(0x00001085, 0b0000000000000100),
	(0x00001087, 0b0000000000000000),
	(0x0000108d, 0b0000000000000100),
	(0x0000108e, 0b0000000000000000),
	(0x0000109d, 0b0000000000000100),
	(0x0000109e, 0b0000000000000000),
	(0x00001100, 0b0000000000010000),
	(0x00001160, 0b0001000000000000),
	(0x000011a8, 0b0000100000000000),
	(0x00001200, 0b0000000000000000),
	(0x0000135d, 0b0000000000000100),
	(0x00001360, 0b0000000000000000),
	(0x00001712, 0b0000000000000100),
	(0x00001716, 0b0000000000000000),
	(0x00001732, 0b0000000000000100),
	(0x00001735, 0b0000000000000000),
	(0x00001752, 0b0000000000000100),
	(0x00001754, 0b0000000000000000),
	(0x00001772, 0b0000000000000100),
	(0x00001774, 0b0000000000000000),
	(0x000017b4, 0b0000000000000100),
	(0x000017b6, 0b0000010000000000),
	(0x000017b7, 0b0000000000000100),
	(0x000017be, 0b0000010000000000),
	(0x000017c6, 0b0000000000000100),
	(0x000017c7, 0b0000010000000000),
	(0x000017c9, 0b0000000000000100),
	(0x000017d4, 0b0000000000000000),
	(0x000017dd, 0b0000000000000100),
	(0x000017de, 0b0000000000000000),
	(0x0000180b, 0b0000000000000100),
	(0x0000180e, 0b0000000000000010),
	(0x0000180f, 0b0000000000000100),
	(0x00001810, 0b0000000000000000),
	(0x00001885, 0b0000000000000100),
	(0x00001887, 0b0000000000000000),
	(0x000018a9, 0b0000000000000100),
	(0x000018aa, 0b0000000000000000),
	(0x00001920, 0b0000000000000100),
	(0x00001923, 0b0000010000000000),
	(0x00001927, 0b0000000000000100),
	(0x00001929, 0b0000010000000000),
	(0x0000192c, 0b0000000000000000),
	(0x00001930, 0b0000010000000000),
	(0x00001932, 0b0000000000000100),
	(0x00001933, 0b0000010000000000),
	(0x00001939, 0b0000000000000100),
	(0x0000193c, 0b0000000000000000),
	(0x00001a17, 0b0000000000000100),
	(0x00001a19, 0b0000010000000000),
	(0x00001a1b, 0b0000000000000100),
	(0x00001a1c, 0b0000000000000000),
	(0x00001a55, 0b0000010000000000),
	(0x00001a56, 0b0000000000000100),
	(0x00001a57, 0b0000010000000000),
	(0x00001a58, 0b0000000000000100),
	(0x00001a5f, 0b0000000000000000),
	(0x00001a60, 0b0000000000000100),
	(0x00001a61, 0b0000000000000000),
	(0x00001a62, 0b0000000000000100),
	(0x00001a63, 0b0000000000000000),
	(0x00001a65, 0b0000000000000100),
	(0x00001a6d, 0b0000010000000000),
	(0x00001a73, 0b0000000000000100),
	(0x00001a7d, 0b0000000000000000),
	(0x00001a7f, 0b0000000000000100),
	(0x00001a80, 0b0000000000000000),
	(0x00001ab0, 0b0000000000000100),
	(0x00001acf, 0b0000000000000000),
	(0x00001b00, 0b0000000000000100),
	(0x00001b04, 0b0000010000000000),
	(0x00001b05, 0b0000000000000000),
	(0x00001b34, 0b0000000000000100),
	(0x00001b3e, 0b0000010000000000),
	(0x00001b42, 0b0000000000000100),
	(0x00001b45, 0b0000000000000000),
	(0x00001b6b, 0b0000000000000100),
	(0x00001b74, 0b0000000000000000),
	(0x00001b80, 0b0000000000000100),
	(0x00001b82, 0b0000010000000000),
	(0x00001b83, 0b0000000000000000),
	(0x00001ba1, 0b0000010000000000),
	(0x00001ba2, 0b0000000000000100),
	(0x00001ba6, 0b0000010000000000),
	(0x00001ba8, 0b0000000000000100),
	(0x00001bae, 0b0000000000000000),
	(0x00001be6, 0b0000000000000100),
	(0x00001be7, 0b0000010000000000),
	(0x00001be8, 0b0000000000000100),
	(0x00001bea, 0b0000010000000000),
	(0x00001bed, 0b0000000000000100),
	(0x00001bee, 0b0000010000000000),
	(0x00001bef, 0b0000000000000100),
	(0x00001bf4, 0b0000000000000000),
	(0x00001c24, 0b0000010000000000),
	(0x00001c2c, 0b0000000000000100),
	(0x00001c34, 0b0000010000000000),
	(0x00001c36, 0b0000000000000100),
	(0x00001c38, 0b0000000000000000),
	(0x00001cd0, 0b0000000000000100),
	(0x00001cd3, 0b0000000000000000),
	(0x00001cd4, 0b0000000000000100),
	(0x00001ce1, 0b0000010000000000),
	(0x00001ce2, 0b0000000000000100),
	(0x00001ce9, 0b0000000000000000),
	(0x00001ced, 0b0000000000000100),
	(0x00001cee, 0b0000000000000000),
	(0x00001cf4, 0b0000000000000100),
	(0x00001cf5, 0b0000000000000000),
	(0x00001cf7, 0b0000010000000000),
	(0x00001cf8, 0b0000000000000100),
	(0x00001cfa, 0b0000000000000000),
	(0x00001dc0, 0b0000000000000100),
	(0x00001e00, 0b0000000000000000),
	(0x0000200b, 0b0000000000000010),
	(0x0000200c, 0b0000000000000100),
	(0x0000200d, 0b0010000000000000),
	(0x0000200e, 0b0000000000000010),
	(0x00002010, 0b0000000000000000),
	(0x00002028, 0b0000000000000010),
	(0x0000202f, 0b0000000000000000),
	(0x0000203c, 0b0000000000001000),
	(0x0000203d, 0b0000000000000000),
	(0x00002049, 0b0000000000001000),
	(0x0000204a, 0b0000000000000000),
	(0x00002060, 0b0000000000000010),
	(0x00002070, 0b0000000000000000),
	(0x000020d0, 0b0000000000000100),
	(0x000020f1, 0b0000000000000000),
	(0x00002122, 0b0000000000001000),
	(0x00002123, 0b0000000000000000),
	(0x00002139, 0b0000000000001000),
	(0x0000213a, 0b0000000000000000),
	(0x00002194, 0b0000000000001000),
	(0x0000219a, 0b0000000000000000),
	(0x000021a9, 0b0000000000001000),
	(0x000021ab, 0b0000000000000000),
	(0x0000231a, 0b0000000000001000),
	(0x0000231c, 0b0000000000000000),
	(0x00002328, 0b0000000000001000),
	(0x00002329, 0b0000000000000000),
	(0x00002388, 0b0000000000001000),
	(0x00002389, 0b0000000000000000),
	(0x000023cf, 0b0000000000001000),
	(0x000023d0, 0b0000000000000000),
	(0x000023e9, 0b0000000000001000),
	(0x000023f4, 0b0000000000000000),
	(0x000023f8, 0b0000000000001000),
	(0x000023fb, 0b0000000000000000),
	(0x000024c2, 0b0000000000001000),
	(0x000024c3, 0b0000000000000000),
	(0x000025aa, 0b0000000000001000),
	(0x000025ac, 0b0000000000000000),
	(0x000025b6, 0b0000000000001000),
	(0x000025b7, 0b0000000000000000),
	(0x000025c0, 0b0000000000001000),
	(0x000025c1, 0b0000000000000000),
	(0x000025fb, 0b0000000000001000),
	(0x000025ff, 0b0000000000000000),
	(0x00002600, 0b0000000000001000),
	(0x00002606, 0b0000000000000000),
	(0x00002607, 0b0000000000001000),
	(0x00002613, 0b0000000000000000),
	(0x00002614, 0b0000000000001000),
	(0x00002686, 0b0000000000000000),
	(0x00002690, 0b0000000000001000),
	(0x00002706, 0b0000000000000000),
	(0x00002708, 0b0000000000001000),
	(0x00002713, 0b0000000000000000),
	(0x00002714, 0b0000000000001000),
	(0x00002715, 0b0000000000000000),
	(0x00002716, 0b0000000000001000),
	(0x00002717, 0b0000000000000000),
	(0x0000271d, 0b0000000000001000),
	(0x0000271e, 0b0000000000000000),
	(0x00002721, 0b0000000000001000),
	(0x00002722, 0b0000000000000000),
	(0x00002728, 0b0000000000001000),
	(0x00002729, 0b0000000000000000),
	(0x00002733, 0b0000000000001000),
	(0x00002735, 0b0000000000000000),
	(0x00002744, 0b0000000000001000),
	(0x00002745, 0b0000000000000000),
	(0x00002747, 0b0000000000001000),
	(0x00002748, 0b0000000000000000),
	(0x0000274c, 0b0000000000001000),
	(0x0000274d, 0b0000000000000000),
	(0x0000274e, 0b0000000000001000),
	(0x0000274f, 0b0000000000000000),
	(0x00002753, 0b0000000000001000),
	(0x00002756, 0b0000000000000000),
	(0x00002757, 0b0000000000001000),
	(0x00002758, 0b0000000000000000),
	(0x00002763, 0b0000000000001000),
	(0x00002768, 0b0000000000000000),
	(0x00002795, 0b0000000000001000),
	(0x00002798, 0b0000000000000000),
	(0x000027a1, 0b0000000000001000),
	(0x000027a2, 0b0000000000000000),
	(0x000027b0, 0b0000000000001000),
	(0x000027b1, 0b0000000000000000),
	(0x000027bf, 0b0000000000001000),
	(0x000027c0, 0b0000000000000000),
	(0x00002934, 0b0000000000001000),
	(0x00002936, 0b0000000000000000),
	(0x00002b05, 0b0000000000001000),
	(0x00002b08, 0b0000000000000000),
	(0x00002b1b, 0b0000000000001000),
	(0x00002b1d, 0b0000000000000000),
	(0x00002b50, 0b0000000000001000),
	(0x00002b51, 0b0000000000000000),
	(0x00002b55, 0b0000000000001000),
	(0x00002b56, 0b0000000000000000),
	(0x00002cef, 0b0000000000000100),
	(0x00002cf2, 0b0000000000000000),
	(0x00002d7f, 0b0000000000000100),
	(0x00002d80, 0b0000000000000000),
	(0x00002de0, 0b0000000000000100),
	(0x00002e00, 0b0000000000000000),
	(0x0000302a, 0b0000000000000100),
	(0x00003030, 0b0000000000001000),
	(0x00003031, 0b0000000000000000),
	(0x0000303d, 0b0000000000001000),
	(0x0000303e, 0b0000000000000000),
	(0x00003099, 0b0000000000000100),
	(0x0000309b, 0b0000000000000000),
	(0x00003297, 0b0000000000001000),
	(0x00003298, 0b0000000000000000),
	(0x00003299, 0b0000000000001000),
	(0x0000329a, 0b0000000000000000),
	(0x0000a66f, 0b0000000000000100),
	(0x0000a673, 0b0000000000000000),
	(0x0000a674, 0b0000000000000100),
	(0x0000a67e, 0b0000000000000000),
	(0x0000a69e, 0b0000000000000100),
	(0x0000a6a0, 0b0000000000000000),
	(0x0000a6f0, 0b0000000000000100),
	(0x0000a6f2, 0b0000000000000000),
	(0x0000a802, 0b0000000000000100),
	(0x0000a803, 0b0000000000000000),
	(0x0000a806, 0b0000000000000100),
	(0x0000a807, 0b0000000000000000),
	(0x0000a80b, 0b0000000000000100),
	(0x0000a80c, 0b0000000000000000),
	(0x0000a823, 0b0000010000000000),
	(0x0000a825, 0b0000000000000100),
	(0x0000a827, 0b0000010000000000),
	(0x0000a828, 0b0000000000000000),
	(0x0000a82c, 0b0000000000000100),
	(0x0000a82d, 0b0000000000000000),
	(0x0000a880, 0b0000010000000000),
	(0x0000a882, 0b0000000000000000),
	(0x0000a8b4, 0b0000010000000000),
	(0x0000a8c4, 0b0000000000000100),
	(0x0000a8c6, 0b0000000000000000),
	(0x0000a8e0, 0b0000000000000100),
	(0x0000a8f2, 0b0000000000000000),
	(0x0000a8ff, 0b0000000000000100),
	(0x0000a900, 0b0000000000000000),
	(0x0000a926, 0b0000000000000100),
	(0x0000a92e, 0b0000000000000000),
	(0x0000a947, 0b0000000000000100),
	(0x0000a952, 0b0000010000000000),
	(0x0000a953, 0b0000000000000100),
	(0x0000a954, 0b0000000000000000),
	(0x0000a960, 0b0000000000010000),
	(0x0000a97d, 0b0000000000000000),
	(0x0000a980, 0b0000000000000100),
	(0x0000a983, 0b0000010000000000),
	(0x0000a984, 0b0000000000000000),
	(0x0000a9b3, 0b0000000000000100),
	(0x0000a9b4, 0b0000010000000000),
	(0x0000a9b6, 0b0000000000000100),
	(0x0000a9ba, 0b0000010000000000),
	(0x0000a9bc, 0b0000000000000100),
	(0x0000a9be, 0b0000010000000000),
	(0x0000a9c0, 0b0000000000000100),
	(0x0000a9c1, 0b0000000000000000),
	(0x0000a9e5, 0b0000000000000100),
	(0x0000a9e6, 0b0000000000000000),
	(0x0000aa29, 0b0000000000000100),
	(0x0000aa2f, 0b0000010000000000),
	(0x0000aa31, 0b0000000000000100),
	(0x0000aa33, 0b0000010000000000),
	(0x0000aa35, 0b0000000000000100),
	(0x0000aa37, 0b0000000000000000),
	(0x0000aa43, 0b0000000000000100),
	(0x0000aa44, 0b0000000000000000),
	(0x0000aa4c, 0b0000000000000100),
	(0x0000aa4d, 0b0000010000000000),
	(0x0000aa4e, 0b0000000000000000),
	(0x0000aa7c, 0b0000000000000100),
	(0x0000aa7d, 0b0000000000000000),
	(0x0000aab0, 0b0000000000000100),
	(0x0000aab1, 0b0000000000000000),
	(0x0000aab2, 0b0000000000000100),
	(0x0000aab5, 0b0000000000000000),
	(0x0000aab7, 0b0000000000000100),
	(0x0000aab9, 0b0000000000000000),
	(0x0000aabe, 0b0000000000000100),
	(0x0000aac0, 0b0000000000000000),
	(0x0000aac1, 0b0000000000000100),
	(0x0000aac2, 0b0000000000000000),
	(0x0000aaeb, 0b0000010000000000),
	(0x0000aaec, 0b0000000000000100),
	(0x0000aaee, 0b0000010000000000),
	(0x0000aaf0, 0b0000000000000000),
	(0x0000aaf5, 0b0000010000000000),
	(0x0000aaf6, 0b0000000000000100),
	(0x0000aaf7, 0b0000000000000000),
	(0x0000abe3, 0b0000010000000000),
	(0x0000abe5, 0b0000000000000100),
	(0x0000abe6, 0b0000010000000000),
	(0x0000abe8, 0b0000000000000100),
	(0x0000abe9, 0b0000010000000000),
	(0x0000abeb, 0b0000000000000000),
	(0x0000abec, 0b0000010000000000),
	(0x0000abed, 0b0000000000000100),
	(0x0000abee, 0b0000000000000000),
	(0x0000ac00, 0b0000000001000000),
	(0x0000ac01, 0b0000000010000000),
	(0x0000ac1c, 0b0000000001000000),
	(0x0000ac1d, 0b0000000010000000),
	(0x0000ac38, 0b0000000001000000),
	(0x0000ac39, 0b0000000010000000),
	(0x0000ac54, 0b0000000001000000),
	(0x0000ac55, 0b0000000010000000),
	(0x0000ac70, 0b0000000001000000),
	(0x0000ac71, 0b0000000010000000),
	(0x0000ac8c, 0b0000000001000000),
	(0x0000ac8d, 0b0000000010000000),
	(0x0000aca8, 0b0000000001000000),
	(0x0000aca9, 0b0000000010000000),
	(0x0000acc4, 0b0000000001000000),
	(0x0000acc5, 0b0000000010000000),
	(0x0000ace0, 0b0000000001000000),
	(0x0000ace1, 0b0000000010000000),
	(0x0000acfc, 0b0000000001000000),
	(0x0000acfd, 0b0000000010000000),
	(0x0000ad18, 0b0000000001000000),
	(0x0000ad19, 0b0000000010000000),
	(0x0000ad34, 0b0000000001000000),
	(0x0000ad35, 0b0000000010000000),
	(0x0000ad50, 0b0000000001000000),
	(0x0000ad51, 0b0000000010000000),
	(0x0000ad6c, 0b0000000001000000),
	(0x0000ad6d, 0b0000000010000000),
	(0x0000ad88, 0b0000000001000000),
	(0x0000ad89, 0b0000000010000000),
	(0x0000ada4, 0b0000000001000000),
	(0x0000ada5, 0b0000000010000000),
	(0x0000adc0, 0b0000000001000000),
	(0x0000adc1, 0b0000000010000000),
	(0x0000addc, 0b0000000001000000),
	(0x0000addd, 0b0000000010000000),
	(0x0000adf8, 0b0000000001000000),
	(0x0000adf9, 0b0000000010000000),
	(0x0000ae14, 0b0000000001000000),
	(0x0000ae15, 0b0000000010000000),
	(0x0000ae30, 0b0000000001000000),
	(0x0000ae31, 0b0000000010000000),
	(0x0000ae4c, 0b0000000001000000),
	(0x0000ae4d, 0b0000000010000000),
	(0x0000ae68, 0b0000000001000000),
	(0x0000ae69, 0b0000000010000000),
	(0x0000ae84, 0b0000000001000000),
	(0x0000ae85, 0b0000000010000000),
	(0x0000aea0, 0b0000000001000000),
	(0x0000aea1, 0b0000000010000000),
	(0x0000aebc, 0b0000000001000000),
	(0x0000aebd, 0b0000000010000000),
	(0x0000aed8, 0b0000000001000000),
	(0x0000aed9, 0b0000000010000000),
	(0x0000aef4, 0b0000000001000000),
	(0x0000aef5, 0b0000000010000000),
	(0x0000af10, 0b0000000001000000),
	(0x0000af11, 0b0000000010000000),
	(0x0000af2c, 0b0000000001000000),
	(0x0000af2d, 0b0000000010000000),
	(0x0000af48, 0b0000000001000000),
	(0x0000af49, 0b0000000010000000),
	(0x0000af64, 0b0000000001000000),
	(0x0000af65, 0b0000000010000000),
	(0x0000af80, 0b0000000001000000),
	(0x0000af81, 0b0000000010000000),
	(0x0000af9c, 0b0000000001000000),
	(0x0000af9d, 0b0000000010000000),
	(0x0000afb8, 0b0000000001000000),
	(0x0000afb9, 0b0000000010000000),
	(0x0000afd4, 0b0000000001000000),
	(0x0000afd5, 0b0000000010000000),
	(0x0000aff0, 0b0000000001000000),
	(0x0000aff1, 0b0000000010000000),
	(0x0000b00c, 0b0000000001000000),
	(0x0000b00d, 0b0000000010000000),
	(0x0000b028, 0b0000000001000000),
	(0x0000b029, 0b0000000010000000),
	(0x0000b044, 0b0000000001000000),
	(0x0000b045, 0b0000000010000000),
	(0x0000b060, 0b0000000001000000),
	(0x0000b061, 0b0000000010000000),
	(0x0000b07c, 0b0000000001000000),
	(0x0000b07d, 0b0000000010000000),
	(0x0000b098, 0b0000000001000000),
	(0x0000b099, 0b0000000010000000),
	(0x0000b0b4, 0b0000000001000000),
	(0x0000b0b5, 0b0000000010000000),
	(0x0000b0d0, 0b0000000001000000),
	(0x0000b0d1, 0b0000000010000000),
	(0x0000b0ec, 0b0000000001000000),
	(0x0000b0ed, 0b0000000010000000),
	(0x0000b108, 0b0000000001000000),
	(0x0000b109, 0b0000000010000000),
	(0x0000b124, 0b0000000001000000),
	(0x0000b125, 0b0000000010000000),
	(0x0000b140, 0b0000000001000000),
	(0x0000b141, 0b0000000010000000),
	(0x0000b15c, 0b0000000001000000),
	(0x0000b15d, 0b0000000010000000),
	(0x0000b178, 0b0000000001000000),
	(0x0000b179, 0b0000000010000000),
	(0x0000b194, 0b0000000001000000),
	(0x0000b195, 0b0000000010000000),
	(0x0000b1b0, 0b0000000001000000),
	(0x0000b1b1, 0b0000000010000000),
	(0x0000b1cc, 0b0000000001000000),
	(0x0000b1cd, 0b0000000010000000),
	(0x0000b1e8, 0b0000000001000000),
	(0x0000b1e9, 0b0000000010000000),
	(0x0000b204, 0b0000000001000000),
	(0x0000b205, 0b0000000010000000),
	(0x0000b220, 0b0000000001000000),
	(0x0000b221, 0b0000000010000000),
	(0x0000b23c, 0b0000000001000000),
	(0x0000b23d, 0b0000000010000000),
	(0x0000b258, 0b0000000001000000),
	(0x0000b259, 0b0000000010000000),
	(0x0000b274, 0b0000000001000000),
	(0x0000b275, 0b0000000010000000),
	(0x0000b290, 0b0000000001000000),
	(0x0000b291, 0b0000000010000000),
	(0x0000b2ac, 0b0000000001000000),
	(0x0000b2ad, 0b0000000010000000),
	(0x0000b2c8, 0b0000000001000000),
	(0x0000b2c9, 0b0000000010000000),
	(0x0000b2e4, 0b0000000001000000),
	(0x0000b2e5, 0b0000000010000000),
	(0x0000b300, 0b0000000001000000),
	(0x0000b301, 0b0000000010000000),
	(0x0000b31c, 0b0000000001000000),
	(0x0000b31d, 0b0000000010000000),
	(0x0000b338, 0b0000000001000000),
	(0x0000b339, 0b0000000010000000),
	(0x0000b354, 0b0000000001000000),
	(0x0000b355, 0b0000000010000000),
	(0x0000b370, 0b0000000001000000),
	(0x0000b371, 0b0000000010000000),
	(0x0000b38c, 0b0000000001000000),
	(0x0000b38d, 0b0000000010000000),
	(0x0000b3a8, 0b0000000001000000),
	(0x0000b3a9, 0b0000000010000000),
	(0x0000b3c4, 0b0000000001000000),
	(0x0000b3c5, 0b0000000010000000),
	(0x0000b3e0, 0b0000000001000000),
	(0x0000b3e1, 0b0000000010000000),
	(0x0000b3fc, 0b0000000001000000),
	(0x0000b3fd, 0b0000000010000000),
	(0x0000b418, 0b0000000001000000),
	(0x0000b419, 0b0000000010000000),
	(0x0000b434, 0b0000000001000000),
	(0x0000b435, 0b0000000010000000),
	(0x0000b450, 0b0000000001000000),
	(0x0000b451, 0b0000000010000000),
	(0x0000b46c, 0b0000000001000000),
	(0x0000b46d, 0b0000000010000000),
	(0x0000b488, 0b0000000001000000),
	(0x0000b489, 0b0000000010000000),
	(0x0000b4a4, 0b0000000001000000),
	(0x0000b4a5, 0b0000000010000000),
	(0x0000b4c0, 0b0000000001000000),
	(0x0000b4c1, 0b0000000010000000),
	(0x0000b4dc, 0b0000000001000000),
	(0x0000b4dd, 0b0000000010000000),
	(0x0000b4f8, 0b0000000001000000),
	(0x0000b4f9, 0b0000000010000000),
	(0x0000b514, 0b0000000001000000),
	(0x0000b515, 0b0000000010000000),
	(0x0000b530, 0b0000000001000000),
	(0x0000b531, 0b0000000010000000),
	(0x0000b54c, 0b0000000001000000),
	(0x0000b54d, 0b0000000010000000),
	(0x0000b568, 0b0000000001000000),
	(0x0000b569, 0b0000000010000000),
	(0x0000b584, 0b0000000001000000),
	(0x0000b585, 0b0000000010000000),
	(0x0000b5a0, 0b0000000001000000),
	(0x0000b5a1, 0b0000000010000000),
	(0x0000b5bc, 0b0000000001000000),
	(0x0000b5bd, 0b0000000010000000),
	(0x0000b5d8, 0b0000000001000000),
	(0x0000b5d9, 0b0000000010000000),
	(0x0000b5f4, 0b0000000001000000),
	(0x0000b5f5, 0b0000000010000000),
	(0x0000b610, 0b0000000001000000),
	(0x0000b611, 0b0000000010000000),
	(0x0000b62c, 0b0000000001000000),
	(0x0000b62d, 0b0000000010000000),
	(0x0000b648, 0b0000000001000000),
	(0x0000b649, 0b0000000010000000),
	(0x0000b664, 0b0000000001000000),
	(0x0000b665, 0b0000000010000000),
	(0x0000b680, 0b0000000001000000),
	(0x0000b681, 0b0000000010000000),
	(0x0000b69c, 0b0000000001000000),
	(0x0000b69d, 0b0000000010000000),
	(0x0000b6b8, 0b0000000001000000),
	(0x0000b6b9, 0b0000000010000000),
	(0x0000b6d4, 0b0000000001000000),
	(0x0000b6d5, 0b0000000010000000),
	(0x0000b6f0, 0b0000000001000000),
	(0x0000b6f1, 0b0000000010000000),
	(0x0000b70c, 0b0000000001000000),
	(0x0000b70d, 0b0000000010000000),
	(0x0000b728, 0b0000000001000000),
	(0x0000b729, 0b0000000010000000),
	(0x0000b744, 0b0000000001000000),
	(0x0000b745, 0b0000000010000000),
	(0x0000b760, 0b0000000001000000),
	(0x0000b761, 0b0000000010000000),
	(0x0000b77c, 0b0000000001000000),
	(0x0000b77d, 0b0000000010000000),
	(0x0000b798, 0b0000000001000000),
	(0x0000b799, 0b0000000010000000),
	(0x0000b7b4, 0b0000000001000000),
	(0x0000b7b5, 0b0000000010000000),
	(0x0000b7d0, 0b0000000001000000),
	(0x0000b7d1, 0b0000000010000000),
	(0x0000b7ec, 0b0000000001000000),
	(0x0000b7ed, 0b0000000010000000),
	(0x0000b808, 0b0000000001000000),
	(0x0000b809, 0b0000000010000000),
	(0x0000b824, 0b0000000001000000),
	(0x0000b825, 0b0000000010000000),
	(0x0000b840, 0b0000000001000000),
	(0x0000b841, 0b0000000010000000),
	(0x0000b85c, 0b0000000001000000),
	(0x0000b85d, 0b0000000010000000),
	(0x0000b878, 0b0000000001000000),
	(0x0000b879, 0b0000000010000000),
	(0x0000b894, 0b0000000001000000),
	(0x0000b895, 0b0000000010000000),
	(0x0000b8b0, 0b0000000001000000),
	(0x0000b8b1, 0b0000000010000000),
	(0x0000b8cc, 0b0000000001000000),
	(0x0000b8cd, 0b0000000010000000),
	(0x0000b8e8, 0b0000000001000000),
	(0x0000b8e9, 0b0000000010000000),
	(0x0000b904, 0b0000000001000000),
	(0x0000b905, 0b0000000010000000),
	(0x0000b920, 0b0000000001000000),
	(0x0000b921, 0b0000000010000000),
	(0x0000b93c, 0b0000000001000000),
	(0x0000b93d, 0b0000000010000000),
	(0x0000b958, 0b0000000001000000),
	(0x0000b959, 0b0000000010000000),
	(0x0000b974, 0b0000000001000000),
	(0x0000b975, 0b0000000010000000),
	(0x0000b990, 0b0000000001000000),
	(0x0000b991, 0b0000000010000000),
	(0x0000b9ac, 0b0000000001000000),
	(0x0000b9ad, 0b0000000010000000),
	(0x0000b9c8, 0b0000000001000000),
	(0x0000b9c9, 0b0000000010000000),
	(0x0000b9e4, 0b0000000001000000),
	(0x0000b9e5, 0b0000000010000000),
	(0x0000ba00, 0b0000000001000000),
	(0x0000ba01, 0b0000000010000000),
	(0x0000ba1c, 0b0000000001000000),
	(0x0000ba1d, 0b0000000010000000),
	(0x0000ba38, 0b0000000001000000),
	(0x0000ba39, 0b0000000010000000),
	(0x0000ba54, 0b0000000001000000),
	(0x0000ba55, 0b0000000010000000),
	(0x0000ba70, 0b0000000001000000),
	(0x0000ba71, 0b0000000010000000),
	(0x0000ba8c, 0b0000000001000000),
	(0x0000ba8d, 0b0000000010000000),
	(0x0000baa8, 0b0000000001000000),
	(0x0000baa9, 0b0000000010000000),
	(0x0000bac4, 0b0000000001000000),
	(0x0000bac5, 0b0000000010000000),
	(0x0000bae0, 0b0000000001000000),
	(0x0000bae1, 0b0000000010000000),
	(0x0000bafc, 0b0000000001000000),
	(0x0000bafd, 0b0000000010000000),
	(0x0000bb18, 0b0000000001000000),
	(0x0000bb19, 0b0000000010000000),
	(0x0000bb34, 0b0000000001000000),
	(0x0000bb35, 0b0000000010000000),
	(0x0000bb50, 0b0000000001000000),
	(0x0000bb51, 0b0000000010000000),
	(0x0000bb6c, 0b0000000001000000),
	(0x0000bb6d, 0b0000000010000000),
	(0x0000bb88, 0b0000000001000000),
	(0x0000bb89, 0b0000000010000000),
	(0x0000bba4, 0b0000000001000000),
	(0x0000bba5, 0b0000000010000000),
	(0x0000bbc0, 0b0000000001000000),
	(0x0000bbc1, 0b0000000010000000),
	(0x0000bbdc, 0b0000000001000000),
	(0x0000bbdd, 0b0000000010000000),
	(0x0000bbf8, 0b0000000001000000),
	(0x0000bbf9, 0b0000000010000000),
	(0x0000bc14, 0b0000000001000000),
	(0x0000bc15, 0b0000000010000000),
	(0x0000bc30, 0b0000000001000000),
	(0x0000bc31, 0b0000000010000000),
	(0x0000bc4c, 0b0000000001000000),
	(0x0000bc4d, 0b0000000010000000),
	(0x0000bc68, 0b0000000001000000),
	(0x0000bc69, 0b0000000010000000),
	(0x0000bc84, 0b0000000001000000),
	(0x0000bc85, 0b0000000010000000),
	(0x0000bca0, 0b0000000001000000),
	(0x0000bca1, 0b0000000010000000),
	(0x0000bcbc, 0b0000000001000000),
	(0x0000bcbd, 0b0000000010000000),
	(0x0000bcd8, 0b0000000001000000),
	(0x0000bcd9, 0b0000000010000000),
	(0x0000bcf4, 0b0000000001000000),
	(0x0000bcf5, 0b0000000010000000),
	(0x0000bd10, 0b0000000001000000),
	(0x0000bd11, 0b0000000010000000),
	(0x0000bd2c, 0b0000000001000000),
	(0x0000bd2d, 0b0000000010000000),
	(0x0000bd48, 0b0000000001000000),
	(0x0000bd49, 0b0000000010000000),
	(0x0000bd64, 0b0000000001000000),
	(0x0000bd65, 0b0000000010000000),
	(0x0000bd80, 0b0000000001000000),
	(0x0000bd81, 0b0000000010000000),
	(0x0000bd9c, 0b0000000001000000),
	(0x0000bd9d, 0b0000000010000000),
	(0x0000bdb8, 0b0000000001000000),
	(0x0000bdb9, 0b0000000010000000),
	(0x0000bdd4, 0b0000000001000000),
	(0x0000bdd5, 0b0000000010000000),
	(0x0000bdf0, 0b0000000001000000),
	(0x0000bdf1, 0b0000000010000000),
	(0x0000be0c, 0b0000000001000000),
	(0x0000be0d, 0b0000000010000000),
	(0x0000be28, 0b0000000001000000),
	(0x0000be29, 0b0000000010000000),
	(0x0000be44, 0b0000000001000000),
	(0x0000be45, 0b0000000010000000),
	(0x0000be60, 0b0000000001000000),
	(0x0000be61, 0b0000000010000000),
	(0x0000be7c, 0b0000000001000000),
	(0x0000be7d, 0b0000000010000000),
	(0x0000be98, 0b0000000001000000),
	(0x0000be99, 0b0000000010000000),
	(0x0000beb4, 0b0000000001000000),
	(0x0000beb5, 0b0000000010000000),
	(0x0000bed0, 0b0000000001000000),
	(0x0000bed1, 0b0000000010000000),
	(0x0000beec, 0b0000000001000000),
	(0x0000beed, 0b0000000010000000),
	(0x0000bf08, 0b0000000001000000),
	(0x0000bf09, 0b0000000010000000),
	(0x0000bf24, 0b0000000001000000),
	(0x0000bf25, 0b0000000010000000),
	(0x0000bf40, 0b0000000001000000),
	(0x0000bf41, 0b0000000010000000),
	(0x0000bf5c, 0b0000000001000000),
	(0x0000bf5d, 0b0000000010000000),
	(0x0000bf78, 0b0000000001000000),
	(0x0000bf79, 0b0000000010000000),
	(0x0000bf94, 0b0000000001000000),
	(0x0000bf95, 0b0000000010000000),
	(0x0000bfb0, 0b0000000001000000),
	(0x0000bfb1, 0b0000000010000000),
	(0x0000bfcc, 0b0000000001000000),
	(0x0000bfcd, 0b0000000010000000),
	(0x0000bfe8, 0b0000000001000000),
	(0x0000bfe9, 0b0000000010000000),
	(0x0000c004, 0b0000000001000000),
	(0x0000c005, 0b0000000010000000),
	(0x0000c020, 0b0000000001000000),
	(0x0000c021, 0b0000000010000000),
	(0x0000c03c, 0b0000000001000000),
	(0x0000c03d, 0b0000000010000000),
	(0x0000c058, 0b0000000001000000),
	(0x0000c059, 0b0000000010000000),
	(0x0000c074, 0b0000000001000000),
	(0x0000c075, 0b0000000010000000),
	(0x0000c090, 0b0000000001000000),
	(0x0000c091, 0b0000000010000000),
	(0x0000c0ac, 0b0000000001000000),
	(0x0000c0ad, 0b0000000010000000),
	(0x0000c0c8, 0b0000000001000000),
	(0x0000c0c9, 0b0000000010000000),
	(0x0000c0e4, 0b0000000001000000),
	(0x0000c0e5, 0b0000000010000000),
	(0x0000c100, 0b0000000001000000),
	(0x0000c101, 0b0000000010000000),
	(0x0000c11c, 0b0000000001000000),
	(0x0000c11d, 0b0000000010000000),
	(0x0000c138, 0b0000000001000000),
	(0x0000c139, 0b0000000010000000),
	(0x0000c154, 0b0000000001000000),
	(0x0000c155, 0b0000000010000000),
	(0x0000c170, 0b0000000001000000),
	(0x0000c171, 0b0000000010000000),
	(0x0000c18c, 0b0000000001000000),
	(0x0000c18d, 0b0000000010000000),
	(0x0000c1a8, 0b0000000001000000),
	(0x0000c1a9, 0b0000000010000000),
	(0x0000c1c4, 0b0000000001000000),
	(0x0000c1c5, 0b0000000010000000),
	(0x0000c1e0, 0b0000000001000000),
	(0x0000c1e1, 0b0000000010000000),
	(0x0000c1fc, 0b0000000001000000),
	(0x0000c1fd, 0b0000000010000000),
	(0x0000c218, 0b0000000001000000),
	(0x0000c219, 0b0000000010000000),
	(0x0000c234, 0b0000000001000000),
	(0x0000c235, 0b0000000010000000),
	(0x0000c250, 0b0000000001000000),
	(0x0000c251, 0b0000000010000000),
	(0x0000c26c, 0b0000000001000000),
	(0x0000c26d, 0b0000000010000000),
	(0x0000c288, 0b0000000001000000),
	(0x0000c289, 0b0000000010000000),
	(0x0000c2a4, 0b0000000001000000),
	(0x0000c2a5, 0b0000000010000000),
	(0x0000c2c0, 0b0000000001000000),
	(0x0000c2c1, 0b0000000010000000),
	(0x0000c2dc, 0b0000000001000000),
	(0x0000c2dd, 0b0000000010000000),
	(0x0000c2f8, 0b0000000001000000),
	(0x0000c2f9, 0b0000000010000000),
	(0x0000c314, 0b0000000001000000),
	(0x0000c315, 0b0000000010000000),
	(0x0000c330, 0b0000000001000000),
	(0x0000c331, 0b0000000010000000),
	(0x0000c34c, 0b0000000001000000),
	(0x0000c34d, 0b0000000010000000),
	(0x0000c368, 0b0000000001000000),
	(0x0000c369, 0b0000000010000000),
	(0x0000c384, 0b0000000001000000),
	(0x0000c385, 0b0000000010000000),
	(0x0000c3a0, 0b0000000001000000),
	(0x0000c3a1, 0b0000000010000000),
	(0x0000c3bc, 0b0000000001000000),
	(0x0000c3bd, 0b0000000010000000),
	(0x0000c3d8, 0b0000000001000000),
	(0x0000c3d9, 0b0000000010000000),
	(0x0000c3f4, 0b0000000001000000),
	(0x0000c3f5, 0b0000000010000000),
	(0x0000c410, 0b0000000001000000),
	(0x0000c411, 0b0000000010000000),
	(0x0000c42c, 0b0000000001000000),
	(0x0000c42d, 0b0000000010000000),
	(0x0000c448, 0b0000000001000000),
	(0x0000c449, 0b0000000010000000),
	(0x0000c464, 0b0000000001000000),
	(0x0000c465, 0b0000000010000000),
	(0x0000c480, 0b0000000001000000),
	(0x0000c481, 0b0000000010000000),
	(0x0000c49c, 0b0000000001000000),
	(0x0000c49d, 0b0000000010000000),
	(0x0000c4b8, 0b0000000001000000),
	(0x0000c4b9, 0b0000000010000000),
	(0x0000c4d4, 0b0000000001000000),
	(0x0000c4d5, 0b0000000010000000),
	(0x0000c4f0, 0b0000000001000000),
	(0x0000c4f1, 0b0000000010000000),
	(0x0000c50c, 0b0000000001000000),
	(0x0000c50d, 0b0000000010000000),
	(0x0000c528, 0b0000000001000000),
	(0x0000c529, 0b0000000010000000),
	(0x0000c544, 0b0000000001000000),
	(0x0000c545, 0b0000000010000000),
	(0x0000c560, 0b0000000001000000),
	(0x0000c561, 0b0000000010000000),
	(0x0000c57c, 0b0000000001000000),
	(0x0000c57d, 0b0000000010000000),
	(0x0000c598, 0b0000000001000000),
	(0x0000c599, 0b0000000010000000),
	(0x0000c5b4, 0b0000000001000000),
	(0x0000c5b5, 0b0000000010000000),
	(0x0000c5d0, 0b0000000001000000),
	(0x0000c5d1, 0b0000000010000000),
	(0x0000c5ec, 0b0000000001000000),
	(0x0000c5ed, 0b0000000010000000),
	(0x0000c608, 0b0000000001000000),
	(0x0000c609, 0b0000000010000000),
	(0x0000c624, 0b0000000001000000),
	(0x0000c625, 0b0000000010000000),
	(0x0000c640, 0b0000000001000000),
	(0x0000c641, 0b0000000010000000),
	(0x0000c65c, 0b0000000001000000),
	(0x0000c65d, 0b0000000010000000),
	(0x0000c678, 0b0000000001000000),
	(0x0000c679, 0b0000000010000000),
	(0x0000c694, 0b0000000001000000),
	(0x0000c695, 0b0000000010000000),
	(0x0000c6b0, 0b0000000001000000),
	(0x0000c6b1, 0b0000000010000000),
	(0x0000c6cc, 0b0000000001000000),
	(0x0000c6cd, 0b0000000010000000),
	(0x0000c6e8, 0b0000000001000000),
	(0x0000c6e9, 0b0000000010000000),
	(0x0000c704, 0b0000000001000000),
	(0x0000c705, 0b0000000010000000),
	(0x0000c720, 0b0000000001000000),
	(0x0000c721, 0b0000000010000000),
	(0x0000c73c, 0b0000000001000000),
	(0x0000c73d, 0b0000000010000000),
	(0x0000c758, 0b0000000001000000),
	(0x0000c759, 0b0000000010000000),
	(0x0000c774, 0b0000000001000000),
	(0x0000c775, 0b0000000010000000),
	(0x0000c790, 0b0000000001000000),
	(0x0000c791, 0b0000000010000000),
	(0x0000c7ac, 0b0000000001000000),
	(0x0000c7ad, 0b0000000010000000),
	(0x0000c7c8, 0b0000000001000000),
	(0x0000c7c9, 0b0000000010000000),
	(0x0000c7e4, 0b0000000001000000),
	(0x0000c7e5, 0b0000000010000000),
	(0x0000c800, 0b0000000001000000),
	(0x0000c801, 0b0000000010000000),
	(0x0000c81c, 0b0000000001000000),
	(0x0000c81d, 0b0000000010000000),
	(0x0000c838, 0b0000000001000000),
	(0x0000c839, 0b0000000010000000),
	(0x0000c854, 0b0000000001000000),
	(0x0000c855, 0b0000000010000000),
	(0x0000c870, 0b0000000001000000),
	(0x0000c871, 0b0000000010000000),
	(0x0000c88c, 0b0000000001000000),
	(0x0000c88d, 0b0000000010000000),
	(0x0000c8a8, 0b0000000001000000),
	(0x0000c8a9, 0b0000000010000000),
	(0x0000c8c4, 0b0000000001000000),
	(0x0000c8c5, 0b0000000010000000),
	(0x0000c8e0, 0b0000000001000000),
	(0x0000c8e1, 0b0000000010000000),
	(0x0000c8fc, 0b0000000001000000),
	(0x0000c8fd, 0b0000000010000000),
	(0x0000c918, 0b0000000001000000),
	(0x0000c919, 0b0000000010000000),
	(0x0000c934, 0b0000000001000000),
	(0x0000c935, 0b0000000010000000),
	(0x0000c950, 0b0000000001000000),
	(0x0000c951, 0b0000000010000000),
	(0x0000c96c, 0b0000000001000000),
	(0x0000c96d, 0b0000000010000000),
	(0x0000c988, 0b0000000001000000),
	(0x0000c989, 0b0000000010000000),
	(0x0000c9a4, 0b0000000001000000),
	(0x0000c9a5, 0b0000000010000000),
	(0x0000c9c0, 0b0000000001000000),
	(0x0000c9c1, 0b0000000010000000),
	(0x0000c9dc, 0b0000000001000000),
	(0x0000c9dd, 0b0000000010000000),
	(0x0000c9f8, 0b0000000001000000),
	(0x0000c9f9, 0b0000000010000000),
	(0x0000ca14, 0b0000000001000000),
	(0x0000ca15, 0b0000000010000000),
	(0x0000ca30, 0b0000000001000000),
	(0x0000ca31, 0b0000000010000000),
	(0x0000ca4c, 0b0000000001000000),
	(0x0000ca4d, 0b0000000010000000),
	(0x0000ca68, 0b0000000001000000),
	(0x0000ca69, 0b0000000010000000),
	(0x0000ca84, 0b0000000001000000),
	(0x0000ca85, 0b0000000010000000),
	(0x0000caa0, 0b0000000001000000),
	(0x0000caa1, 0b0000000010000000),
	(0x0000cabc, 0b0000000001000000),
	(0x0000cabd, 0b0000000010000000),
	(0x0000cad8, 0b0000000001000000),
	(0x0000cad9, 0b0000000010000000),
	(0x0000caf4, 0b0000000001000000),
	(0x0000caf5, 0b0000000010000000),
	(0x0000cb10, 0b0000000001000000),
	(0x0000cb11, 0b0000000010000000),
	(0x0000cb2c, 0b0000000001000000),
	(0x0000cb2d, 0b0000000010000000),
	(0x0000cb48, 0b0000000001000000),
	(0x0000cb49, 0b0000000010000000),
	(0x0000cb64, 0b0000000001000000),
	(0x0000cb65, 0b0000000010000000),
	(0x0000cb80, 0b0000000001000000),
	(0x0000cb81, 0b0000000010000000),
	(0x0000cb9c, 0b0000000001000000),
	(0x0000cb9d, 0b0000000010000000),
	(0x0000cbb8, 0b0000000001000000),
	(0x0000cbb9, 0b0000000010000000),
	(0x0000cbd4, 0b0000000001000000),
	(0x0000cbd5, 0b0000000010000000),
	(0x0000cbf0, 0b0000000001000000),
	(0x0000cbf1, 0b0000000010000000),
	(0x0000cc0c, 0b0000000001000000),
	(0x0000cc0d, 0b0000000010000000),
	(0x0000cc28, 0b0000000001000000),
	(0x0000cc29, 0b0000000010000000),
	(0x0000cc44, 0b0000000001000000),
	(0x0000cc45, 0b0000000010000000),
	(0x0000cc60, 0b0000000001000000),
	(0x0000cc61, 0b0000000010000000),
	(0x0000cc7c, 0b0000000001000000),
	(0x0000cc7d, 0b0000000010000000),
	(0x0000cc98, 0b0000000001000000),
	(0x0000cc99, 0b0000000010000000),
	(0x0000ccb4, 0b0000000001000000),
	(0x0000ccb5, 0b0000000010000000),
	(0x0000ccd0, 0b0000000001000000),
	(0x0000ccd1, 0b0000000010000000),
	(0x0000ccec, 0b0000000001000000),
	(0x0000cced, 0b0000000010000000),
	(0x0000cd08, 0b0000000001000000),
	(0x0000cd09, 0b0000000010000000),
	(0x0000cd24, 0b0000000001000000),
	(0x0000cd25, 0b0000000010000000),
	(0x0000cd40, 0b0000000001000000),
	(0x0000cd41, 0b0000000010000000),
	(0x0000cd5c, 0b0000000001000000),
	(0x0000cd5d, 0b0000000010000000),
	(0x0000cd78, 0b0000000001000000),
	(0x0000cd79, 0b0000000010000000),
	(0x0000cd94, 0b0000000001000000),
	(0x0000cd95, 0b0000000010000000),
	(0x0000cdb0, 0b0000000001000000),
	(0x0000cdb1, 0b0000000010000000),
	(0x0000cdcc, 0b0000000001000000),
	(0x0000cdcd, 0b0000000010000000),
	(0x0000cde8, 0b0000000001000000),
	(0x0000cde9, 0b0000000010000000),
	(0x0000ce04, 0b0000000001000000),
	(0x0000ce05, 0b0000000010000000),
	(0x0000ce20, 0b0000000001000000),
	(0x0000ce21, 0b0000000010000000),
	(0x0000ce3c, 0b0000000001000000),
	(0x0000ce3d, 0b0000000010000000),
	(0x0000ce58, 0b0000000001000000),
	(0x0000ce59, 0b0000000010000000),
	(0x0000ce74, 0b0000000001000000),
	(0x0000ce75, 0b0000000010000000),
	(0x0000ce90, 0b0000000001000000),
	(0x0000ce91, 0b0000000010000000),
	(0x0000ceac, 0b0000000001000000),
	(0x0000cead, 0b0000000010000000),
	(0x0000cec8, 0b0000000001000000),
	(0x0000cec9, 0b0000000010000000),
	(0x0000cee4, 0b0000000001000000),
	(0x0000cee5, 0b0000000010000000),
	(0x0000cf00, 0b0000000001000000),
	(0x0000cf01, 0b0000000010000000),
	(0x0000cf1c, 0b0000000001000000),
	(0x0000cf1d, 0b0000000010000000),
	(0x0000cf38, 0b0000000001000000),
	(0x0000cf39, 0b0000000010000000),
	(0x0000cf54, 0b0000000001000000),
	(0x0000cf55, 0b0000000010000000),
	(0x0000cf70, 0b0000000001000000),
	(0x0000cf71, 0b0000000010000000),
	(0x0000cf8c, 0b0000000001000000),
	(0x0000cf8d, 0b0000000010000000),
	(0x0000cfa8, 0b0000000001000000),
	(0x0000cfa9, 0b0000000010000000),
	(0x0000cfc4, 0b0000000001000000),
	(0x0000cfc5, 0b0000000010000000),
	(0x0000cfe0, 0b0000000001000000),
	(0x0000cfe1, 0b0000000010000000),
	(0x0000cffc, 0b0000000001000000),
	(0x0000cffd, 0b0000000010000000),
	(0x0000d018, 0b0000000001000000),
	(0x0000d019, 0b0000000010000000),
	(0x0000d034, 0b0000000001000000),
	(0x0000d035, 0b0000000010000000),
	(0x0000d050, 0b0000000001000000),
	(0x0000d051, 0b0000000010000000),
	(0x0000d06c, 0b0000000001000000),
	(0x0000d06d, 0b0000000010000000),
	(0x0000d088, 0b0000000001000000),
	(0x0000d089, 0b0000000010000000),
	(0x0000d0a4, 0b0000000001000000),
	(0x0000d0a5, 0b0000000010000000),
	(0x0000d0c0, 0b0000000001000000),
	(0x0000d0c1, 0b0000000010000000),
	(0x0000d0dc, 0b0000000001000000),
	(0x0000d0dd, 0b0000000010000000),
	(0x0000d0f8, 0b0000000001000000),
	(0x0000d0f9, 0b0000000010000000),
	(0x0000d114, 0b0000000001000000),
	(0x0000d115, 0b0000000010000000),
	(0x0000d130, 0b0000000001000000),
	(0x0000d131, 0b0000000010000000),
	(0x0000d14c, 0b0000000001000000),
	(0x0000d14d, 0b0000000010000000),
	(0x0000d168, 0b0000000001000000),
	(0x0000d169, 0b0000000010000000),
	(0x0000d184, 0b0000000001000000),
	(0x0000d185, 0b0000000010000000),
	(0x0000d1a0, 0b0000000001000000),
	(0x0000d1a1, 0b0000000010000000),
	(0x0000d1bc, 0b0000000001000000),
	(0x0000d1bd, 0b0000000010000000),
	(0x0000d1d8, 0b0000000001000000),
	(0x0000d1d9, 0b0000000010000000),
	(0x0000d1f4, 0b0000000001000000),
	(0x0000d1f5, 0b0000000010000000),
	(0x0000d210, 0b0000000001000000),
	(0x0000d211, 0b0000000010000000),
	(0x0000d22c, 0b0000000001000000),
	(0x0000d22d, 0b0000000010000000),
	(0x0000d248, 0b0000000001000000),
	(0x0000d249, 0b0000000010000000),
	(0x0000d264, 0b0000000001000000),
	(0x0000d265, 0b0000000010000000),
	(0x0000d280, 0b0000000001000000),
	(0x0000d281, 0b0000000010000000),
	(0x0000d29c, 0b0000000001000000),
	(0x0000d29d, 0b0000000010000000),
	(0x0000d2b8, 0b0000000001000000),
	(0x0000d2b9, 0b0000000010000000),
	(0x0000d2d4, 0b0000000001000000),
	(0x0000d2d5, 0b0000000010000000),
	(0x0000d2f0, 0b0000000001000000),
	(0x0000d2f1, 0b0000000010000000),
	(0x0000d30c, 0b0000000001000000),
	(0x0000d30d, 0b0000000010000000),
	(0x0000d328, 0b0000000001000000),
	(0x0000d329, 0b0000000010000000),
	(0x0000d344, 0b0000000001000000),
	(0x0000d345, 0b0000000010000000),
	(0x0000d360, 0b0000000001000000),
	(0x0000d361, 0b0000000010000000),
	(0x0000d37c, 0b0000000001000000),
	(0x0000d37d, 0b0000000010000000),
	(0x0000d398, 0b0000000001000000),
	(0x0000d399, 0b0000000010000000),
	(0x0000d3b4, 0b0000000001000000),
	(0x0000d3b5, 0b0000000010000000),
	(0x0000d3d0, 0b0000000001000000),
	(0x0000d3d1, 0b0000000010000000),
	(0x0000d3ec, 0b0000000001000000),
	(0x0000d3ed, 0b0000000010000000),
	(0x0000d408, 0b0000000001000000),
	(0x0000d409, 0b0000000010000000),
	(0x0000d424, 0b0000000001000000),
	(0x0000d425, 0b0000000010000000),
	(0x0000d440, 0b0000000001000000),
	(0x0000d441, 0b0000000010000000),
	(0x0000d45c, 0b0000000001000000),
	(0x0000d45d, 0b0000000010000000),
	(0x0000d478, 0b0000000001000000),
	(0x0000d479, 0b0000000010000000),
	(0x0000d494, 0b0000000001000000),
	(0x0000d495, 0b0000000010000000),
	(0x0000d4b0, 0b0000000001000000),
	(0x0000d4b1, 0b0000000010000000),
	(0x0000d4cc, 0b0000000001000000),
	(0x0000d4cd, 0b0000000010000000),
	(0x0000d4e8, 0b0000000001000000),
	(0x0000d4e9, 0b0000000010000000),
	(0x0000d504, 0b0000000001000000),
	(0x0000d505, 0b0000000010000000),
	(0x0000d520, 0b0000000001000000),
	(0x0000d521, 0b0000000010000000),
	(0x0000d53c, 0b0000000001000000),
	(0x0000d53d, 0b0000000010000000),
	(0x0000d558, 0b0000000001000000),
	(0x0000d559, 0b0000000010000000),
	(0x0000d574, 0b0000000001000000),
	(0x0000d575, 0b0000000010000000),
	(0x0000d590, 0b0000000001000000),
	(0x0000d591, 0b0000000010000000),
	(0x0000d5ac, 0b0000000001000000),
	(0x0000d5ad, 0b0000000010000000),
	(0x0000d5c8, 0b0000000001000000),
	(0x0000d5c9, 0b0000000010000000),
	(0x0000d5e4, 0b0000000001000000),
	(0x0000d5e5, 0b0000000010000000),
	(0x0000d600, 0b0000000001000000),
	(0x0000d601, 0b0000000010000000),
	(0x0000d61c, 0b0000000001000000),
	(0x0000d61d, 0b0000000010000000),
	(0x0000d638, 0b0000000001000000),
	(0x0000d639, 0b0000000010000000),
	(0x0000d654, 0b0000000001000000),
	(0x0000d655, 0b0000000010000000),
	(0x0000d670, 0b0000000001000000),
	(0x0000d671, 0b0000000010000000),
	(0x0000d68c, 0b0000000001000000),
	(0x0000d68d, 0b0000000010000000),
	(0x0000d6a8, 0b0000000001000000),
	(0x0000d6a9, 0b0000000010000000),
	(0x0000d6c4, 0b0000000001000000),
	(0x0000d6c5, 0b0000000010000000),
	(0x0000d6e0, 0b0000000001000000),
	(0x0000d6e1, 0b0000000010000000),
	(0x0000d6fc, 0b0000000001000000),
	(0x0000d6fd, 0b0000000010000000),
	(0x0000d718, 0b0000000001000000),
	(0x0000d719, 0b0000000010000000),
	(0x0000d734, 0b0000000001000000),
	(0x0000d735, 0b0000000010000000),
	(0x0000d750, 0b0000000001000000),
	(0x0000d751, 0b0000000010000000),
	(0x0000d76c, 0b0000000001000000),
	(0x0000d76d, 0b0000000010000000),
	(0x0000d788, 0b0000000001000000),
	(0x0000d789, 0b0000000010000000),
	(0x0000d7a4, 0b0000000000000000),
	(0x0000d7b0, 0b0001000000000000),
	(0x0000d7c7, 0b0000000000000000),
	(0x0000d7cb, 0b0000100000000000),
	(0x0000d7fc, 0b0000000000000000),
	(0x0000fb1e, 0b0000000000000100),
	(0x0000fb1f, 0b0000000000000000),
	(0x0000fe00, 0b0000000000000100),
	(0x0000fe10, 0b0000000000000000),
	(0x0000fe20, 0b0000000000000100),
	(0x0000fe30, 0b0000000000000000),
	(0x0000feff, 0b0000000000000010),
	(0x0000ff00, 0b0000000000000000),
	(0x0000ff9e, 0b0000000000000100),
	(0x0000ffa0, 0b0000000000000000),
	(0x0000fff0, 0b0000000000000010),
	(0x0000fffc, 0b0000000000000000),
	(0x000101fd, 0b0000000000000100),
	(0x000101fe, 0b0000000000000000),
	(0x000102e0, 0b0000000000000100),
	(0x000102e1, 0b0000000000000000),
	(0x00010376, 0b0000000000000100),
	(0x0001037b, 0b0000000000000000),
	(0x00010a01, 0b0000000000000100),
	(0x00010a04, 0b0000000000000000),
	(0x00010a05, 0b0000000000000100),
	(0x00010a07, 0b0000000000000000),
	(0x00010a0c, 0b0000000000000100),
	(0x00010a10, 0b0000000000000000),
	(0x00010a38, 0b0000000000000100),
	(0x00010a3b, 0b0000000000000000),
	(0x00010a3f, 0b0000000000000100),
	(0x00010a40, 0b0000000000000000),
	(0x00010ae5, 0b0000000000000100),
	(0x00010ae7, 0b0000000000000000),
	(0x00010d24, 0b0000000000000100),
	(0x00010d28, 0b0000000000000000),
	(0x00010d69, 0b0000000000000100),
	(0x00010d6e, 0b0000000000000000),
	(0x00010eab, 0b0000000000000100),
	(0x00010ead, 0b0000000000000000),
	(0x00010efc, 0b0000000000000100),
	(0x00010f00, 0b0000000000000000),
	(0x00010f46, 0b0000000000000100),
	(0x00010f51, 0b0000000000000000),
	(0x00010f82, 0b0000000000000100),
	(0x00010f86, 0b0000000000000000),
	(0x00011000, 0b0000010000000000),
	(0x00011001, 0b0000000000000100),
	(0x00011002, 0b0000010000000000),
	(0x00011003, 0b0000000000000000),
	(0x00011038, 0b0000000000000100),
	(0x00011047, 0b0000000000000000),
	(0x00011070, 0b0000000000000100),
	(0x00011071, 0b0000000000000000),
	(0x00011073, 0b0000000000000100),
	(0x00011075, 0b0000000000000000),
	(0x0001107f, 0b0000000000000100),
	(0x00011082, 0b0000010000000000),
	(0x00011083, 0b0000000000000000),
	(0x000110b0, 0b0000010000000000),
	(0x000110b3, 0b0000000000000100),
	(0x000110b7, 0b0000010000000000),
	(0x000110b9, 0b0000000000000100),
	(0x000110bb, 0b0000000000000000),
	(0x000110bd, 0b0000000100000000),
	(0x000110be, 0b0000000000000000),
	(0x000110c2, 0b0000000000000100),
	(0x000110c3, 0b0000000000000000),
	(0x000110cd, 0b0000000100000000),
	(0x000110ce, 0b0000000000000000),
	(0x00011100, 0b0000000000000100),
	(0x00011103, 0b0000000000000000),
	(0x00011127, 0b0000000000000100),
	(0x0001112c, 0b0000010000000000),
	(0x0001112d, 0b0000000000000100),
	(0x00011135, 0b0000000000000000),
	(0x00011145, 0b0000010000000000),
	(0x00011147, 0b0000000000000000),
	(0x00011173, 0b0000000000000100),
	(0x00011174, 0b0000000000000000),
	(0x00011180, 0b0000000000000100),
	(0x00011182, 0b0000010000000000),
	(0x00011183, 0b0000000000000000),
	(0x000111b3, 0b0000010000000000),
	(0x000111b6, 0b0000000000000100),
	(0x000111bf, 0b0000010000000000),
	(0x000111c0, 0b0000000000000100),
	(0x000111c1, 0b0000000000000000),
	(0x000111c2, 0b0000000100000000),
	(0x000111c4, 0b0000000000000000),
	(0x000111c9, 0b0000000000000100),
	(0x000111cd, 0b0000000000000000),
	(0x000111ce, 0b0000010000000000),
	(0x000111cf, 0b0000000000000100),
	(0x000111d0, 0b0000000000000000),
	(0x0001122c, 0b0000010000000000),
	(0x0001122f, 0b0000000000000100),
	(0x00011232, 0b0000010000000000),
	(0x00011234, 0b0000000000000100),
	(0x00011238, 0b0000000000000000),
	(0x0001123e, 0b0000000000000100),
	(0x0001123f, 0b0000000000000000),
	(0x00011241, 0b0000000000000100),
	(0x00011242, 0b0000000000000000),
	(0x000112df, 0b0000000000000100),
	(0x000112e0, 0b0000010000000000),
	(0x000112e3, 0b0000000000000100),
	(0x000112eb, 0b0000000000000000),
	(0x00011300, 0b0000000000000100),
	(0x00011302, 0b0000010000000000),
	(0x00011304, 0b0000000000000000),
	(0x0001133b, 0b0000000000000100),
	(0x0001133d, 0b0000000000000000),
	(0x0001133e, 0b0000000000000100),
	(0x0001133f, 0b0000010000000000),
	(0x00011340, 0b0000000000000100),
	(0x00011341, 0b0000010000000000),
	(0x00011345, 0b0000000000000000),
	(0x00011347, 0b0000010000000000),
	(0x00011349, 0b0000000000000000),
	(0x0001134b, 0b0000010000000000),
	(0x0001134d, 0b0000000000000100),
	(0x0001134e, 0b0000000000000000),
	(0x00011357, 0b0000000000000100),
	(0x00011358, 0b0000000000000000),
	(0x00011362, 0b0000010000000000),
	(0x00011364, 0b0000000000000000),
	(0x00011366, 0b0000000000000100),
	(0x0001136d, 0b0000000000000000),
	(0x00011370, 0b0000000000000100),
	(0x00011375, 0b0000000000000000),
	(0x000113b8, 0b0000000000000100),
	(0x000113b9, 0b0000010000000000),
	(0x000113bb, 0b0000000000000100),
	(0x000113c1, 0b0000000000000000),
	(0x000113c2, 0b0000000000000100),
	(0x000113c3, 0b0000000000000000),
	(0x000113c5, 0b0000000000000100),
	(0x000113c6, 0b0000000000000000),
	(0x000113c7, 0b0000000000000100),
	(0x000113ca, 0b0000010000000000),
	(0x000113cb, 0b0000000000000000),
	(0x000113cc, 0b0000010000000000),
	(0x000113ce, 0b0000000000000100),
	(0x000113d1, 0b0000000100000000),
	(0x000113d2, 0b0000000000000100),
	(0x000113d3, 0b0000000000000000),
	(0x000113e1, 0b0000000000000100),
	(0x000113e3, 0b0000000000000000),
	(0x00011435, 0b0000010000000000),
	(0x00011438, 0b0000000000000100),
	(0x00011440, 0b0000010000000000),
	(0x00011442, 0b0000000000000100),
	(0x00011445, 0b0000010000000000),
	(0x00011446, 0b0000000000000100),
	(0x00011447, 0b0000000000000000),
	(0x0001145e, 0b0000000000000100),
	(0x0001145f, 0b0000000000000000),
	(0x000114b0, 0b0000000000000100),
	(0x000114b1, 0b0000010000000000),
	(0x000114b3, 0b0000000000000100),
	(0x000114b9, 0b0000010000000000),
	(0x000114ba, 0b0000000000000100),
	(0x000114bb, 0b0000010000000000),
	(0x000114bd, 0b0000000000000100),
	(0x000114be, 0b0000010000000000),
	(0x000114bf, 0b0000000000000100),
	(0x000114c1, 0b0000010000000000),
	(0x000114c2, 0b0000000000000100),
	(0x000114c4, 0b0000000000000000),
	(0x000115af, 0b0000000000000100),
	(0x000115b0, 0b0000010000000000),
	(0x000115b2, 0b0000000000000100),
	(0x000115b6, 0b0000000000000000),
	(0x000115b8, 0b0000010000000000),
	(0x000115bc, 0b0000000000000100),
	(0x000115be, 0b0000010000000000),
	(0x000115bf, 0b0000000000000100),
	(0x000115c1, 0b0000000000000000),
	(0x000115dc, 0b0000000000000100),
	(0x000115de, 0b0000000000000000),
	(0x00011630, 0b0000010000000000),
	(0x00011633, 0b0000000000000100),
	(0x0001163b, 0b0000010000000000),
	(0x0001163d, 0b0000000000000100),
	(0x0001163e, 0b0000010000000000),
	(0x0001163f, 0b0000000000000100),
	(0x00011641, 0b0000000000000000),
	(0x000116ab, 0b0000000000000100),
	(0x000116ac, 0b0000010000000000),
	(0x000116ad, 0b0000000000000100),
	(0x000116ae, 0b0000010000000000),
	(0x000116b0, 0b0000000000000100),
	(0x000116b8, 0b0000000000000000),
	(0x0001171d, 0b0000000000000100),
	(0x0001171e, 0b0000010000000000),
	(0x0001171f, 0b0000000000000100),
	(0x00011720, 0b0000000000000000),
	(0x00011722, 0b0000000000000100),
	(0x00011726, 0b0000010000000000),
	(0x00011727, 0b0000000000000100),
	(0x0001172c, 0b0000000000000000),
	(0x0001182c, 0b0000010000000000),
	(0x0001182f, 0b0000000000000100),
	(0x00011838, 0b0000010000000000),
	(0x00011839, 0b0000000000000100),
	(0x0001183b, 0b0000000000000000),
	(0x00011930, 0b0000000000000100),
	(0x00011931, 0b0000010000000000),
	(0x00011936, 0b0000000000000000),
	(0x00011937, 0b0000010000000000),
	(0x00011939, 0b0000000000000000),
	(0x0001193b, 0b0000000000000100),
	(0x0001193f, 0b0000000100000000),
	(0x00011940, 0b0000010000000000),
	(0x00011941, 0b0000000100000000),
	(0x00011942, 0b0000010000000000),
	(0x00011943, 0b0000000000000100),
	(0x00011944, 0b0000000000000000),
	(0x000119d1, 0b0000010000000000),
	(0x000119d4, 0b0000000000000100),
	(0x000119d8, 0b0000000000000000),
	(0x000119da, 0b0000000000000100),
	(0x000119dc, 0b0000010000000000),
	(0x000119e0, 0b0000000000000100),
	(0x000119e1, 0b0000000000000000),
	(0x000119e4, 0b0000010000000000),
	(0x000119e5, 0b0000000000000000),
	(0x00011a01, 0b0000000000000100),
	(0x00011a0b, 0b0000000000000000),
	(0x00011a33, 0b0000000000000100),
	(0x00011a39, 0b0000010000000000),
	(0x00011a3a, 0b0000000100000000),
	(0x00011a3b, 0b0000000000000100),
	(0x00011a3f, 0b0000000000000000),
	(0x00011a47, 0b0000000000000100),
	(0x00011a48, 0b0000000000000000),
	(0x00011a51, 0b0000000000000100),
	(0x00011a57, 0b0000010000000000),
	(0x00011a59, 0b0000000000000100),
	(0x00011a5c, 0b0000000000000000),
	(0x00011a84, 0b0000000100000000),
	(0x00011a8a, 0b0000000000000100),
	(0x00011a97, 0b0000010000000000),
	(0x00011a98, 0b0000000000000100),
	(0x00011a9a, 0b0000000000000000),
	(0x00011c2f, 0b0000010000000000),
	(0x00011c30, 0b0000000000000100),
	(0x00011c37, 0b0000000000000000),
	(0x00011c38, 0b0000000000000100),
	(0x00011c3e, 0b0000010000000000),
	(0x00011c3f, 0b0000000000000100),
	(0x00011c40, 0b0000000000000000),
	(0x00011c92, 0b0000000000000100),
	(0x00011ca8, 0b0000000000000000),
	(0x00011ca9, 0b0000010000000000),
	(0x00011caa, 0b0000000000000100),
	(0x00011cb1, 0b0000010000000000),
	(0x00011cb2, 0b0000000000000100),
	(0x00011cb4, 0b0000010000000000),
	(0x00011cb5, 0b0000000000000100),
	(0x00011cb7, 0b0000000000000000),
	(0x00011d31, 0b0000000000000100),
	(0x00011d37, 0b0000000000000000),
	(0x00011d3a, 0b0000000000000100),
	(0x00011d3b, 0b0000000000000000),
	(0x00011d3c, 0b0000000000000100),
	(0x00011d3e, 0b0000000000000000),
	(0x00011d3f, 0b0000000000000100),
	(0x00011d46, 0b0000000100000000),
	(0x00011d47, 0b0000000000000100),
	(0x00011d48, 0b0000000000000000),
	(0x00011d8a, 0b0000010000000000),
	(0x00011d8f, 0b0000000000000000),
	(0x00011d90, 0b0000000000000100),
	(0x00011d92, 0b0000000000000000),
	(0x00011d93, 0b0000010000000000),
	(0x00011d95, 0b0000000000000100),
	(0x00011d96, 0b0000010000000000),
	(0x00011d97, 0b0000000000000100),
	(0x00011d98, 0b0000000000000000),
	(0x00011ef3, 0b0000000000000100),
	(0x00011ef5, 0b0000010000000000),
	(0x00011ef7, 0b0000000000000000),
	(0x00011f00, 0b0000000000000100),
	(0x00011f02, 0b0000000100000000),
	(0x00011f03, 0b0000010000000000),
	(0x00011f04, 0b0000000000000000),
	(0x00011f34, 0b0000010000000000),
	(0x00011f36, 0b0000000000000100),
	(0x00011f3b, 0b0000000000000000),
	(0x00011f3e, 0b0000010000000000),
	(0x00011f40, 0b0000000000000100),
	(0x00011f43, 0b0000000000000000),
	(0x00011f5a, 0b0000000000000100),
	(0x00011f5b, 0b0000000000000000),
	(0x00013430, 0b0000000000000010),
	(0x00013440, 0b0000000000000100),
	(0x00013441, 0b0000000000000000),
	(0x00013447, 0b0000000000000100),
	(0x00013456, 0b0000000000000000),
	(0x0001611e, 0b0000000000000100),
	(0x0001612a, 0b0000010000000000),
	(0x0001612d, 0b0000000000000100),
	(0x00016130, 0b0000000000000000),
	(0x00016af0, 0b0000000000000100),
	(0x00016af5, 0b0000000000000000),
	(0x00016b30, 0b0000000000000100),
	(0x00016b37, 0b0000000000000000),
	(0x00016d63, 0b0001000000000000),
	(0x00016d64, 0b0000000000000000),
	(0x00016d67, 0b0001000000000000),
	(0x00016d6b, 0b0000000000000000),
	(0x00016f4f, 0b0000000000000100),
	(0x00016f50, 0b0000000000000000),
	(0x00016f51, 0b0000010000000000),
	(0x00016f88, 0b0000000000000000),
	(0x00016f8f, 0b0000000000000100),
	(0x00016f93, 0b0000000000000000),
	(0x00016fe4, 0b0000000000000100),
	(0x00016fe5, 0b0000000000000000),
	(0x00016ff0, 0b0000000000000100),
	(0x00016ff2, 0b0000000000000000),
	(0x0001bc9d, 0b0000000000000100),
	(0x0001bc9f, 0b0000000000000000),
	(0x0001bca0, 0b0000000000000010),
	(0x0001bca4, 0b0000000000000000),
	(0x0001cf00, 0b0000000000000100),
	(0x0001cf2e, 0b0000000000000000),
	(0x0001cf30, 0b0000000000000100),
	(0x0001cf47, 0b0000000000000000),
	(0x0001d165, 0b0000000000000100),
	(0x0001d16a, 0b0000000000000000),
	(0x0001d16d, 0b0000000000000100),
	(0x0001d173, 0b0000000000000010),
	(0x0001d17b, 0b0000000000000100),
	(0x0001d183, 0b0000000000000000),
	(0x0001d185, 0b0000000000000100),
	(0x0001d18c, 0b0000000000000000),
	(0x0001d1aa, 0b0000000000000100),
	(0x0001d1ae, 0b0000000000000000),
	(0x0001d242, 0b0000000000000100),
	(0x0001d245, 0b0000000000000000),
	(0x0001da00, 0b0000000000000100),
	(0x0001da37, 0b0000000000000000),
	(0x0001da3b, 0b0000000000000100),
	(0x0001da6d, 0b0000000000000000),
	(0x0001da75, 0b0000000000000100),
	(0x0001da76, 0b0000000000000000),
	(0x0001da84, 0b0000000000000100),
	(0x0001da85, 0b0000000000000000),
	(0x0001da9b, 0b0000000000000100),
	(0x0001daa0, 0b0000000000000000),
	(0x0001daa1, 0b0000000000000100),
	(0x0001dab0, 0b0000000000000000),
	(0x0001e000, 0b0000000000000100),
	(0x0001e007, 0b0000000000000000),
	(0x0001e008, 0b0000000000000100),
	(0x0001e019, 0b0000000000000000),
	(0x0001e01b, 0b0000000000000100),
	(0x0001e022, 0b0000000000000000),
	(0x0001e023, 0b0000000000000100),
	(0x0001e025, 0b0000000000000000),
	(0x0001e026, 0b0000000000000100),
	(0x0001e02b, 0b0000000000000000),
	(0x0001e08f, 0b0000000000000100),
	(0x0001e090, 0b0000000000000000),
	(0x0001e130, 0b0000000000000100),
	(0x0001e137, 0b0000000000000000),
	(0x0001e2ae, 0b0000000000000100),
	(0x0001e2af, 0b0000000000000000),
	(0x0001e2ec, 0b0000000000000100),
	(0x0001e2f0, 0b0000000000000000),
	(0x0001e4ec, 0b0000000000000100),
	(0x0001e4f0, 0b0000000000000000),
	(0x0001e5ee, 0b0000000000000100),
	(0x0001e5f0, 0b0000000000000000),
	(0x0001e8d0, 0b0000000000000100),
	(0x0001e8d7, 0b0000000000000000),
	(0x0001e944, 0b0000000000000100),
	(0x0001e94b, 0b0000000000000000),
	(0x0001f000, 0b0000000000001000),
	(0x0001f100, 0b0000000000000000),
	(0x0001f10d, 0b0000000000001000),
	(0x0001f110, 0b0000000000000000),
	(0x0001f12f, 0b0000000000001000),
	(0x0001f130, 0b0000000000000000),
	(0x0001f16c, 0b0000000000001000),
	(0x0001f172, 0b0000000000000000),
	(0x0001f17e, 0b0000000000001000),
	(0x0001f180, 0b0000000000000000),
	(0x0001f18e, 0b0000000000001000),
	(0x0001f18f, 0b0000000000000000),
	(0x0001f191, 0b0000000000001000),
	(0x0001f19b, 0b0000000000000000),
	(0x0001f1ad, 0b0000000000001000),
	(0x0001f1e6, 0b0000001000000000),
	(0x0001f200, 0b0000000000000000),
	(0x0001f201, 0b0000000000001000),
	(0x0001f210, 0b0000000000000000),
	(0x0001f21a, 0b0000000000001000),
	(0x0001f21b, 0b0000000000000000),
	(0x0001f22f, 0b0000000000001000),
	(0x0001f230, 0b0000000000000000),
	(0x0001f232, 0b0000000000001000),
	(0x0001f23b, 0b0000000000000000),
	(0x0001f23c, 0b0000000000001000),
	(0x0001f240, 0b0000000000000000),
	(0x0001f249, 0b0000000000001000),
	(0x0001f3fb, 0b0000000000000100),
	(0x0001f400, 0b0000000000001000),
	(0x0001f53e, 0b0000000000000000),
	(0x0001f546, 0b0000000000001000),
	(0x0001f650, 0b0000000000000000),
	(0x0001f680, 0b0000000000001000),
	(0x0001f700, 0b0000000000000000),
	(0x0001f774, 0b0000000000001000),
	(0x0001f780, 0b0000000000000000),
	(0x0001f7d5, 0b0000000000001000),
	(0x0001f800, 0b0000000000000000),
	(0x0001f80c, 0b0000000000001000),
	(0x0001f810, 0b0000000000000000),
	(0x0001f848, 0b0000000000001000),
	(0x0001f850, 0b0000000000000000),
	(0x0001f85a, 0b0000000000001000),
	(0x0001f860, 0b0000000000000000),
	(0x0001f888, 0b0000000000001000),
	(0x0001f890, 0b0000000000000000),
	(0x0001f8ae, 0b0000000000001000),
	(0x0001f900, 0b0000000000000000),
	(0x0001f90c, 0b0000000000001000),
	(0x0001f93b, 0b0000000000000000),
	(0x0001f93c, 0b0000000000001000),
	(0x0001f946, 0b0000000000000000),
	(0x0001f947, 0b0000000000001000),
	(0x0001fb00, 0b0000000000000000),
	(0x0001fc00, 0b0000000000001000),
	(0x0001fffe, 0b0000000000000000),
	(0x000e0000, 0b0000000000000010),
	(0x000e0020, 0b0000000000000100),
	(0x000e0080, 0b0000000000000010),
	(0x000e0100, 0b0000000000000100),
	(0x000e01f0, 0b0000000000000010),
	(0x000e1000, 0b0000000000000000),
];
07070100000007000081A4000000000000000000000001675331E200000120000000000000000000000000000000000000003200000000madeline-0.1+git.1733505506.5c2abae/graph/util.haexport fn getprops(r: rune) prop = {
	let r = r: u32;
	let bot = 0z, top = len(props) - 1;
	for (bot + 1 < top) {
		let idx = (bot + top) / 2;
		if (props[idx].0 > r) top = idx else bot = idx;
	};
	return props[bot].1;
};

export fn hasprop(r: rune, p: prop) bool = getprops(r) & p != 0;
07070100000008000041ED000000000000000000000002675331E200000000000000000000000000000000000000000000002900000000madeline-0.1+git.1733505506.5c2abae/made07070100000009000081A4000000000000000000000001675331E200000031000000000000000000000000000000000000003000000000madeline-0.1+git.1733505506.5c2abae/made/READMEtiny readline-alike with some batteries included
0707010000000A000081A4000000000000000000000001675331E20000214D000000000000000000000000000000000000003400000000madeline-0.1+git.1733505506.5c2abae/made/actions.hause bufio;
use fmt;
use io;
use memio;
use sort;
use strings;

export type action_noarg = fn(s: *state) (void | error);

// keep sorted
let action_noargstr: [_](str, *action_noarg) = [
	("append-newline", &append_newline),
	("clear", &clear_action),
	("complete", &complete),
	("exit-cancel", &exit_cancel),
	("exit-done", &exit_done),
	("exit-eof", &exit_eof),
	("exit-eof-ifzero", &exit_eof_ifzero),
	("hist-down", &histdown),
	("hist-tok-down", &histtokendown),
	("hist-tok-up", &histtokenup),
	("hist-up", &histup),
	("insert-hint", &insert_hint),
	("insert-hint-ifend", &insert_hint_ifend),
	("insert-literal", &insert_literal),
	("mode-hist", &mode_hist),
	("mode-hist-tok", &mode_hist_tok),
	("mode-normal", &mode_normal),
	("mode-search", &mode_search),
	("mode-vi-normal", &mode_vi_normal),
	("number1", &number1),
	("number2", &number2),
	("number3", &number3),
	("number4", &number4),
	("number5", &number5),
	("number6", &number6),
	("number7", &number7),
	("number8", &number8),
	("number9", &number9),
	("reset-hidx", &reset_hidx),
	("unkill", &unkill),
	("unkill-pop", &unkill_pop),
	("zero-or-home", &zero_or_home),
];

export type action_arg = fn(s: *state, m: *motion) (void | error);

// keep sorted
let action_argstr: [_](str, *action_arg) = [
	("kill", &kill),
	("kill-push", &kill_push),
];

// Pull new lines from other madeline instances into the in-memory history
fn update_hist(s: *state) (void | error) = {
	for (let buf => bufio::read_line(s.ctx.hist.source)?) {
		defer free(buf);
		hist_add(s, hist_unescape(strings::fromutf8(buf)?), false);
	};
};

fn histup(s: *state) (void | error) = {
	update_hist(s)?;
	let h = &s.ctx.hist;
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL, mode::HIST_TOK =>
		if (len(h.our_hist) == 0) return;
		h.hidx = len(h.our_hist);
		hist_add(s, strings::dup(strings::fromutf8(s.buf)!), true);
	case mode::SEARCH =>
		if (h.hidx != 0) h.hidx -= 1;
		return;
	case mode::HIST => void;
	};
	if (h.hidx != 0) h.hidx -= 1;
	clear(s);
	set_mode(s, mode::HIST);
	s.buf = strings::toutf8(strings::dup(h.our_hist[h.hidx]));
	s.pos = len(s.buf);
};

fn histdown(s: *state) (void | error) = {
	update_hist(s)?;
	let h = &s.ctx.hist;
	let buf = strings::fromutf8(s.buf)!;
	h.hidx += 1;
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL, mode::HIST_TOK =>
		hist_add(s, strings::dup(buf), true);
		clear(s);
		set_mode(s, mode::NORMAL);
	case mode::SEARCH =>
		for (h.hidx < len(h.hist); h.hidx += 1) {
			if (strings::contains(h.hist[h.hidx], buf)) {
				break;
			};
		};
	case mode::HIST =>
		clear(s);
		if (h.hidx < len(h.our_hist)) {
			appendstr(s, h.our_hist[h.hidx]);
		} else {
			set_mode(s, mode::NORMAL);
		};
	};
};

fn set_tok(s: *state, tok: str) void = {
	let h = &s.ctx.hist;
	let buf = memio::dynamic();
	let sbuf = strings::fromutf8(s.buf)!;
	let (e, end, _) = s.ctx.split.escape(sbuf, "");
	free(e);
	defer free(end);
	memio::concat(&buf, end)!;

	let (token, _, _) = s.ctx.split.split(sbuf, -1);
	defer free(token);
	if (token != "") {
		memio::concat(&buf, " ")!;
	};

	let (e, end, _) = s.ctx.split.escape("", tok);
	defer free(e);
	defer free(end);
	memio::concat(&buf, end, e)!;
	free(h.tok);
	h.tok = memio::string(&buf)!;
};

fn histtokenup(s: *state) (void | error) = {
	update_hist(s)?;
	let h = &s.ctx.hist;
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL => if (len(h.our_hist) == 0) return;
	case mode::SEARCH => return;
	case mode::HIST, mode::HIST_TOK => void;
	};
	if (s.mode != mode::HIST_TOK) {
		h.tokline = len(h.our_hist);
		h.tokidx = 0;
		free(h.tok);
		h.tok = "";
	};
	set_mode(s, mode::HIST_TOK);

	for (h.tokline > 0 || h.tokidx > 0) {
		if (h.tokidx == 0) {
			h.tokline -= 1;
			// tokidx becomes -1, which gets the last token in the
			// previous line
		};
		h.tokidx -= 1;

		let line = h.our_hist[h.tokline];
		let (token, count, _) = s.ctx.split.split(line, h.tokidx);
		defer free(token);
		h.tokidx = count;
		if (h.tok == token) {
			continue;
		};

		set_tok(s, token);
		break;
	};
};

fn histtokendown(s: *state) (void | error) = {
	update_hist(s)?;
	if (s.mode != mode::HIST_TOK) return;
	let h = &s.ctx.hist;
	for (h.tokline < len(h.our_hist)) {
		h.tokidx += 1;
		let line = h.our_hist[h.tokline];
		let (token, count, end) = s.ctx.split.split(line, h.tokidx);
		defer free(token);
		h.tokidx = count;

		if (end) {
			h.tokline += 1;
			h.tokidx = -1;
			continue;
		};

		if (h.tok == token) {
			continue;
		};

		set_tok(s, token);
		return;
	};
	s.hint = "";
	set_mode(s, mode::NORMAL);
};

fn complete(s: *state) (void | error) = {
	freecompletions(s);
	s.completions = s.ctx.complete(s.ctx, s.buf, s.pos);
	sort::sort(s.completions.1, size((str, str)), &cmp_completion);
	for (let i = 1z; i < len(s.completions.1); i += 1) {
		let prev = s.completions.1[i - 1];
		let cur = s.completions.1[i];
		if (prev.0 != cur.0 || prev.1 != cur.1) continue;
		delete(s.completions.1[i]);
		i -= 1;
	};
	let pfx = prefix(s.completions.1);
	defer free(pfx);
	let complete = pfx != "";
	if (len(s.completions.1) == 1 && s.completions.1[0].0 == "") {
		complete = true;
	};
	if (complete) {
		appendstr(s, pfx);
		if (len(s.completions.1) == 1) {
			appendstr(s, s.completions.1[0].1);
		};
		freecompletions(s);
	};
};

fn cmp_completion(a: const *opaque, b: const *opaque) int = {
	const a = a: *const (str, str), b = b: *const (str, str);
	return strings::compare(a.0, b.0);
};

fn _kill(s: *state, m: *motion, push: bool) (void | error) = {
	let (start, end) = move(s, m);
	if (start >= end) return;
	assert(len(s.buf) > 0);
	if (push) append(s.ctx.kill, alloc(s.buf[start..end]...));
	delete(s.buf[start..end]);
	s.pos = start;
};

fn kill(s: *state, m: *motion) (void | error) = _kill(s, m, false);

fn kill_push(s: *state, m: *motion) (void | error) = _kill(s, m, true);

fn unkill(s: *state) (void | error) = {
	let kill = &s.ctx.kill;
	if (len(kill) == 0) return;
	insert(s.buf[s.pos], kill[len(kill) - 1]...);
	s.pos += len(kill[len(kill) - 1]);
};

fn unkill_pop(s: *state) (void | error) = {
	let kill = &s.ctx.kill;
	if (len(kill) == 0) return;
	insert(s.buf[s.pos], kill[len(kill) - 1]...);
	s.pos += len(kill[len(kill) - 1]);
	free(kill[len(kill) - 1]);
	delete(kill[len(kill) - 1]);
};

fn exit_eof(s: *state) (void | error) = s.signal = io::EOF;

fn exit_eof_ifzero(s: *state) (void | error) =
	if (len(s.buf) == 0) s.signal = io::EOF;

fn exit_cancel(s: *state) (void | error) = s.signal = exit;

fn exit_done(s: *state) (void | error) = {
	if (!s.ctx.check_done(s.ctx, s.buf)) {
		append_newline(s)?;
		return;
	};
	let buf = strings::dup(strings::fromutf8(s.buf)?);
	s.ret = buf;
	hist_add(s, strings::dup(buf), true);
	if (!strings::hasprefix(buf, " ")) {
		let line = hist_escape(buf);
		defer free(line);
		fmt::fprintln(s.ctx.hist.storage, line)?;
		update_hist(s)?;
	};
};


fn mode_normal(s: *state) (void | error) = set_mode(s, mode::NORMAL);

fn mode_search(s: *state) (void | error) = set_mode(s, mode::SEARCH);

fn mode_hist(s: *state) (void | error) = set_mode(s, mode::HIST);

fn mode_hist_tok(s: *state) (void | error) = set_mode(s, mode::HIST_TOK);

fn mode_vi_normal(s: *state) (void | error) = set_mode(s, mode::VI_NORMAL);

fn insert_hint(s: *state) (void | error) = {
	appendstr(s, s.hint);
	update_hint(s);
};

fn insert_hint_ifend(s: *state) (void | error) =
	if (s.pos == len(s.buf)) insert_hint(s);

// XXX: terminal
fn clear_action(s: *state) (void | error) = {
	fmt::fprint(s.out, "\x1b[2J\x1b[H")?;
};

fn reset_hidx(s: *state) (void | error) = s.ctx.hist.hidx = len(s.ctx.hist.hist);

// XXX: terminal
fn insert_literal(s: *state) (void | error) = match (bufio::read_rune(s.in)) {
case io::EOF =>
	s.signal = io::EOF;
case let r: rune =>
	appendrune(s, r);
};

fn append_newline(s: *state) (void | error) = appendstr(s, "\n");

fn zero_or_home(s: *state) (void | error) = {
	if (s.reps == 0) move(s, &home);
	s.new_reps = s.reps * 10;
};
fn number1(s: *state) (void | error) = s.new_reps = s.reps * 10 + 1;
fn number2(s: *state) (void | error) = s.new_reps = s.reps * 10 + 2;
fn number3(s: *state) (void | error) = s.new_reps = s.reps * 10 + 3;
fn number4(s: *state) (void | error) = s.new_reps = s.reps * 10 + 4;
fn number5(s: *state) (void | error) = s.new_reps = s.reps * 10 + 5;
fn number6(s: *state) (void | error) = s.new_reps = s.reps * 10 + 6;
fn number7(s: *state) (void | error) = s.new_reps = s.reps * 10 + 7;
fn number8(s: *state) (void | error) = s.new_reps = s.reps * 10 + 8;
fn number9(s: *state) (void | error) = s.new_reps = s.reps * 10 + 9;
0707010000000B000081A4000000000000000000000001675331E2000009F7000000000000000000000000000000000000003500000000madeline-0.1+git.1733505506.5c2abae/made/complete.hause fs;
use io;
use os;
use path;
use strings;
use unix::passwd;
use unix;

// Returns a the current token (shown before all completions in the UI) and a
// list of possible completions (text, addendum), where addendum is appended to
// the buffer after text if the completion is selected.
export type completer = fn(ctx: *context, buf: []u8, pos: size) (str, [](str, str));

// A [[completer]] that doesn't create any completions.
export fn complete_none(
	ctx: *context,
	buf: []u8,
	pos: size,
) (str, [](str, str)) = ("", []);

// A [[completer]] that completes the final token with existing paths
// on the filesystem.
export fn complete_fs(ctx: *context, buf: []u8, pos: size) (str, [](str, str)) = {
	let bufctx = strings::fromutf8(buf[..pos])!;
	let (buf, _, _) = ctx.split.split(bufctx, -1);
	defer free(buf);
	let (first, rest) = strings::cut(buf, "/");
	let first = strings::iter(first);
	match (strings::next(&first)) {
	case done => void;
	case let r: rune =>
		if (r != '~') yield;
		let user = strings::iterstr(&first);
		let pw = if (user == "") {
			yield passwd::getuid(unix::getuid());
		} else {
			yield passwd::getuser(user);
		};
		if (pw is void) yield;
		let pw = pw as passwd::pwent;
		defer passwd::pwent_finish(&pw);
		match (strings::index(buf, '/')) {
		case void =>
			free(buf);
			buf = strings::dup(pw.homedir);
		case size =>
			// rest is borrowed from buf
			let tmp = buf;
			buf = strings::concat(pw.homedir, "/", rest);
			free(tmp);
		};
	};

	let (dir, base) = (".", buf);
	if (strings::contains(buf, '/')) {
		// TODO: tuple unpacking assignment
		let (a, b) = strings::rcut(buf, "/");
		dir = a;
		base = b;
		if (dir == "") {
			dir = "/";
		};
	};

	let it = match (os::iter(dir)) {
	case let it: *fs::iterator =>
		yield it;
	case fs::error =>
		return ("", []);
	};
	defer fs::finish(it);

	let ret: [](str, str) = [];
	for (let d => fs::next(it)) {
		let d = match (d) {
		case let d: fs::dirent => yield d;
		case fs::error => continue;
		};
		if (base == "" && (d.name == "." || d.name == "..")) continue;
		if (strings::hasprefix(d.name, base)) {
			let name = strings::trimprefix(d.name, base);
			let end = " ";
			if (fs::isdir(d.ftype)) {
				name = strings::concat(name, "/");
				end = "";
			};
			defer if (fs::isdir(d.ftype)) free(name);
			let (escaped, eend, ctx) = ctx.split.escape(bufctx, name);
			defer free(eend);
			if (ctx) {
				end = strings::concat(eend, end);
				append(ret, (escaped, end));
			} else {
				free(escaped);
			};
		};
	};
	return (strings::dup(base), ret);
};
0707010000000C000081A4000000000000000000000001675331E2000017BA000000000000000000000000000000000000003300000000madeline-0.1+git.1733505506.5c2abae/made/config.hause dirs;
use errors;
use fmt;
use format::ini;
use fs;
use io;
use memio;
use os;
use path;
use sort::cmp;
use sort;
use strconv;
use strings;

export type action = (*motion | *action_noarg | *action_arg);

export type bctx = enum uint {
	ACTION = 1 << 1,
	MOTION = 1 << 2,
};

export type binding = struct {
	trigger: []event,
	action: []action,
	ctx: bctx,
};

export type mconfig = struct {
	defaultinsert: bool,
	inherit: (mode | void),
	bindings: []binding,
};

fn binding_dup(b: binding) binding = binding {
	trigger = events_dup(b.trigger),
	action = alloc(b.action...),
	ctx = b.ctx,
};

fn binding_finish(b: binding) void = {
	for (let i = 0z; i < len(b.trigger); i += 1) {
		event_finish(b.trigger[i]);
	};
	free(b.trigger);
	free(b.action);
};

export type config = [mode::LAST + 1]mconfig;

export fn config_free(cfg: config) void = {
	for (let i = 0z; i < len(cfg); i += 1) {
		for (let j = 0z; j < len(cfg[i].bindings); j += 1) {
			binding_finish(cfg[i].bindings[j]);
		};
		free(cfg[i].bindings);
	};
};

fn config_finalize(cfg: *config) (void | error) = for (true) {
	let found = false;
	let end = true;
	for (let i = 0z; i < len(cfg); i += 1) {
		let m = match (cfg[i].inherit) {
		case void => continue;
		case let m: mode => yield m;
		};

		if (cfg[m].inherit is mode) {
			end = false;
			continue;
		};

		found = true;
		cfg[i].inherit = void;

		let ib = &cfg[i].bindings;
		let mb = &cfg[m].bindings;

		for :loop (let j = 0z; j < len(mb); j += 1) {
			for (let k = 0z; k < len(ib); k += 1) {
				if (events_eq(mb[j].trigger, ib[k].trigger)) {
					continue :loop;
				};
			};
			append(ib, binding_dup(mb[j]));
		};
	};
	if (!end && !found) return "Inheritance loop in config file": config_error;
	if (end) return;
};

export fn config_default(name: str) (config | error) = {
	let default = memio::fixed(strings::toutf8(default_config));
	let cfg: config = [mconfig { inherit = void, ... }...];
	cfg = config_handle(cfg, &default)?;

	static let buf = path::buffer { ... };
	path::set(&buf, dirs::config("madeline"))!;
	path::push(&buf, "config")!;
	cfg = config_file(cfg, path::string(&buf))?;

	match (os::getenv("MADELINE_CONFIG")) {
	case void => void;
	case let c: str =>
		cfg = config_file(cfg, c)?;
	};

	path::pop(&buf);
	path::push(&buf, name)!;
	cfg = config_file(cfg, path::string(&buf))?;

	return cfg;
};

export fn config_file(cfg: config, in: str) (config | error) = {
	match (os::open(in)) {
	case errors::noentry => return cfg;
	case let e: fs::error => return e;
	case let f: io::file =>
		defer io::close(f)!;
		return config_handle(cfg, f)?;
	};
};

export fn config_handle(cfg: config, in: io::handle) (config | error) = {
	let sc = ini::scan(in);
	defer ini::finish(&sc);

	for (let e => ini::next(&sc)?) {
		let b: binding = binding {
			ctx = bctx::ACTION | bctx::MOTION,
			...
		};

		let m = parse_mode(e.0)?;
		e.1 = strings::trim(e.1);
		e.2 = strings::trim(e.2);

		switch (e.1) {
		case "_defaultinsert" =>
			cfg[m].defaultinsert = switch (e.2) {
			case "true" => yield true;
			case "false" => yield false;
			case =>
				return fmt::asprint("Invalid value", e.2,
					"for _defaultinsert in config file, must be either \"true\" or \"false\""): config_error;
			};
			continue;
		case "_inherit" =>
			cfg[m].inherit = parse_mode(e.2)?;
			continue;
		case => void;
		};

		let tok = strings::tokenize(e.1, " ");
		for (let e => parse_event(&tok, &b)?) {
			append(b.trigger, e);
		};

		let tok = strings::tokenize(e.2, " ");
		for (let t => strings::next_token(&tok)) {
			append(b.action, parse_action(t)?);
		};

		for (let i = 0z; i < len(cfg[m].bindings); i += 1) {
			if (cfg[m].bindings[i].ctx != b.ctx) continue;
			if (events_eq(cfg[m].bindings[i].trigger, b.trigger)) {
				delete(cfg[m].bindings[i]);
				i -= 1;
			};
		};

		append(cfg[m].bindings, b);
	};

	return cfg;
};

fn parse_mode(s: str) (mode | error) = switch (s) {
case "", "normal" => return mode::NORMAL;
case "search" => return mode::SEARCH;
case "hist" => return mode::HIST;
case "hist_tok" => return mode::HIST_TOK;
case "vi_normal" => return mode::VI_NORMAL;
case =>
	// XXX: memory leak
	// XXX: also fuck this double-cast
	return fmt::asprint("Invalid section title", s, "in config file"): config_error: error;
};

fn parse_event(tok: *strings::tokenizer, b: *binding) (event | done | error) = {
	let m: mods = 0;
	for :loop (let t => strings::next_token(tok)) {
		switch (t) {
		case "_action" =>
			b.ctx = bctx::ACTION;
			continue :loop;
		case "_motion" =>
			b.ctx = bctx::MOTION;
			continue :loop;
		case => void;
		};

		for (let i = 0z; i < len(mod_str); i += 1) {
			if (t == mod_str[i]) {
				m |= i: mods;
				continue :loop;
			};
		};

		for (let i = 0z; i < len(symbol_str); i += 1) {
			if (t == symbol_str[i]) {
				return (i: symbol, m): event;
			};
		};

		let it = strings::iter(t);
		match :error (strings::next(&it)) {
		case done => void;
		case let r: rune =>
			if (r == '\\') {
				let r = match (strings::next(&it)) {
				case done => yield :error;
				case let r: rune =>
					yield r;
				};
				if (r != 'u') yield :error;
				r = strconv::stou32(strings::iterstr(&it),
					strconv::base::HEX)?: rune;
				return (r, m): event;
			} else if (strings::next(&it) is done) {
				return (r, m): event;
			};
		};

		return fmt::asprintf("Invalid key name '{}' in config file",
			t): config_error: error;
	};

	return done;
};

fn parse_action(s: str) (action | error) = {
	// XXX: &s and cmp::strs here is kinda dubious but correct
	match (sort::search(motionstr, size((str, *motion)), &s, &cmp::strs)) {
	case void => void;
	case let idx: size =>
		return motionstr[idx].1;
	};

	match (sort::search(action_noargstr, size((str, *action_noarg)), &s, &cmp::strs)) {
	case void => void;
	case let idx: size =>
		return action_noargstr[idx].1;
	};

	match (sort::search(action_argstr, size((str, *action_arg)), &s, &cmp::strs)) {
	case void => void;
	case let idx: size =>
		return action_argstr[idx].1;
	};

	return fmt::asprint("Invalid action name", s, "in config file"): config_error: error;
};
0707010000000D000081A4000000000000000000000001675331E200000B16000000000000000000000000000000000000003B00000000madeline-0.1+git.1733505506.5c2abae/made/default_config.haexport const default_config = `
[normal]
_defaultinsert = true
eof = exit-eof
ctrl a = home
ctrl b = prev-char
ctrl c = exit-cancel
ctrl d = exit-eof-ifzero kill next-char
ctrl e = end
ctrl f = insert-hint-ifend next-char
ctrl h = kill prev-char
backspace = kill prev-char
\u09 = complete
\u0a = mode-normal exit-done
\u0d = mode-normal exit-done
ctrl k = kill-push end
ctrl l = clear
ctrl n = hist-down
ctrl p = hist-up
ctrl r = mode-search reset-hidx
ctrl u = kill-push home
ctrl v = insert-literal
ctrl w = kill-push prev-word
ctrl y = unkill-pop
alt b = prev-word
alt f = next-word
alt k = kill end
alt u = kill home
alt w = kill prev-word
alt y = unkill
alt . = hist-tok-up
alt > = hist-tok-down
alt : = hist-tok-down
alt \u0a = append-newline
alt \u0d = append-newline
alt \u7f = kill-push prev-word
up = hist-up
down = hist-down
right = insert-hint-ifend next-char
alt right = next-word
ctrl right = next-word
left = prev-char
alt left = prev-word
ctrl left = prev-word
home = home
end = end
delete = kill next-char
\u1b = prev-char mode-vi-normal

[search]
_defaultinsert = true
_inherit = normal
ctrl c = end kill home mode-normal
ctrl f = next-char
ctrl g = mode-normal
\u0a = end kill home mode-normal insert-hint exit-done
\u0d = end kill home mode-normal insert-hint exit-done
ctrl r = hist-up
right = next-char

[hist]
_defaultinsert = true
_inherit = normal
ctrl c = end kill home mode-normal
ctrl f = next-char
right = next-char

[hist_tok]
_defaultinsert = true
_inherit = hist

[vi_normal]
_defaultinsert = false
ctrl c = exit-cancel
ctrl d = exit-eof-ifzero
\u0a = mode-normal exit-done
\u0d = mode-normal exit-done
ctrl l = clear
up = hist-up
down = hist-down
right = insert-hint-ifend next-char
alt right = next-word
ctrl right = next-word
left = prev-char
alt left = prev-word
ctrl left = prev-word
0 = zero-or-home
1 = number1
2 = number2
3 = number3
4 = number4
5 = number5
6 = number6
7 = number7
8 = number8
9 = number9
_ = home next-word prev-word
^ = home next-word prev-word
$ = end
I = home next-word prev-word mode-normal
A = end mode-normal
i = mode-normal
a = next-char mode-normal
h = prev-char
l = next-char
k = hist-up
j = hist-down
_action d = kill-push
_motion d = full-line
# incorrect
b = prev-word
B = prev-word
# incorrect
e = next-char next-word prev-char
E = next-char next-word prev-char
# incorrect
g e = next-word prev-word prev-word next-word prev-char
# incorrect
g E = next-word prev-word prev-word next-word prev-char
# incorrect
w = next-word next-word prev-word
# incorrect
W = next-word next-word prev-word
? = mode-search
/ = mode-search
x = kill next-char
X = prev-char kill next-char
s = kill next-char mode-normal
S = end kill-push home mode-normal
g I = home mode-normal
g $ = end
g _ = end prev-word next-word
delete = kill next-char
ctrl h = prev-char
backspace = prev-char
`;
0707010000000E000081A4000000000000000000000001675331E20000023A000000000000000000000000000000000000003100000000madeline-0.1+git.1733505506.5c2abae/made/hint.hause strings;

// Returns a string to be used as the hint text. The return value
// may be statically allocated.
export type hinter = fn(ctx: *context, buf: []u8) str;

// A [[hinter]] that hints previous entries in the history.
export fn hint_history(ctx: *context, buf: []u8) str = {
	let buf = strings::fromutf8(buf)!;
	if (buf == "") return "";
	let h = &ctx.hist;
	for (let i = len(h.hist) + 1; i > 0; i -= 1) if (i <= len(h.hist)) {
		let i = i - 1;
		if (strings::hasprefix(h.hist[i], buf)) {
			return strings::trimprefix(h.hist[i], buf);
		};
	};
	return "";
};
0707010000000F000081A4000000000000000000000001675331E200000FC1000000000000000000000000000000000000003100000000madeline-0.1+git.1733505506.5c2abae/made/hist.hause bufio;
use fs;
use io;
use os;
use strings;

// Escapes a line of history, converting it from the in-memory representation to
// the on-disk format.
export fn hist_escape(line: str) str =
	strings::multireplace(line, ("\\", "\\\\"), ("\n", "\\n"));

// Unescapes a line of history, converting it from the on-disk format to the
// in-memory representation.
export fn hist_unescape(line: str) str =
	strings::multireplace(line, ("\\\\", "\\"), ("\\n", "\n"));

// An in-memory representation of line-by-line history, backed by an
// [[io::handle]] for long-term storage. In-memory history is de-duplicated.
export type history = struct {
	storage: io::handle,
	// Used to pull in new history from other madeline instances
	source: io::handle,
	hist: []str,
	our_hist: []str,
	hidx: size,

	tok: str,
	tokline: size,
	tokidx: size,
};

// Stores [[history]] in memory without a backing handle.
export fn histmem() history = history {
	storage = io::empty,
	source = io::empty,
	...
};

// Loads a [[history]] from a file at the given path, creating a new file if
// it doesn't already exist.
export fn histfile(p: str) (history | error) = {
	const file = os::create(p, fs::mode::USER_RW,
		fs::flag::RDWR | fs::flag::CREATE | fs::flag::APPEND)?;
	let store = histhandle(file)?;
	store.source = os::open(p)?;
	let off = io::seek(store.storage, 0, io::whence::CUR)?;
	io::seek(store.source, off, io::whence::SET)?;
	return store;
};

// Loads a [[history]] from an [[io::handle]].
export fn histhandle(file: io::handle) (history | error) = {
	match (file) {
	case let file: io::file =>
		match (histhandle_mmap(file)) {
		case let hist: history =>
			return hist;
		case => void;
		};
	case => void;
	};

	let store = history {
		storage = file,
		source = io::empty,
		...
	};

	for (let line => bufio::read_line(file)?) {
		defer free(line);
		append(store.hist, hist_unescape(strings::fromutf8(line)?));
	};

	let seen = table { ... };
	defer table_finish(seen);
	for (let i = len(store.hist); i > 0; i -= 1) {
		let i = i - 1;
		if (!table_insert(&seen, store.hist[i])) {
			free(store.hist[i]);
			delete(store.hist[i]);
		};
	};

	return store;
};

fn histhandle_mmap(file: io::file) (history | error) = {
	let store = history {
		storage = file,
		source = io::empty,
		...
	};

	const off = io::seek(file, 0, io::whence::END)?;
	io::seek(file, 0, io::whence::SET)?;
	defer io::seek(file, off, io::whence::SET)!;

	const data = io::mmap(null, off: size, io::prot::READ,
		io::mflag::PRIVATE, file, 0)?: *[*]u8;
	defer io::munmap(data, off: size)!;
	const data = data[..off];
	const data = strings::fromutf8(data)?;

	let seen = table { ... };
	defer table_finish(seen);
	let tok = strings::rtokenize(data, "\n");
	for (let line => strings::next_token(&tok)) {
		if (line == "" || !table_insert(&seen, line)) {
			continue;
		};
		append(store.hist, hist_unescape(line));
	};
	for (let i = 0z; i < len(store.hist) / 2; i += 1) {
		let tmp = store.hist[i];
		store.hist[i] = store.hist[len(store.hist) - i - 1];
		store.hist[len(store.hist) - i - 1] = tmp;
	};

	return store;
};

// Frees the memory associated with a [[history]] struct, and closes the
// [[io::handle]] to the long-term storage.
export fn hist_finish(h: *history) (void | io::error) = {
	strings::freeall(h.hist);
	strings::freeall(h.our_hist);
	io::close(h.storage)?;
	io::close(h.source)?;
};

fn hist_add(s: *state, new: str, ours: bool) void = {
	let h = &s.ctx.hist;
	if (len(strings::trim(new)) == 0) {
		free(new);
		return;
	};
	for (let i = 0z; i < len(h.hist); i += 1) {
		if (h.hist[i] == new) {
			free(h.hist[i]);
			delete(h.hist[i]);
			i -= 1;
			if (s.mode == mode::SEARCH && i < h.hidx) h.hidx -= 1;
		};
	};
	if (s.mode == mode::SEARCH && h.hidx == len(h.hist)) h.hidx += 1;
	append(h.hist, new);
	if (!ours) return;
	for (let i = 0z; i < len(h.our_hist); i += 1) {
		if (h.our_hist[i] == new) {
			free(h.our_hist[i]);
			delete(h.our_hist[i]);
			i -= 1;
			if (i < h.hidx) h.hidx -= 1;
		};
	};
	append(h.our_hist, strings::dup(new));
};
07070100000010000081A4000000000000000000000001675331E200001004000000000000000000000000000000000000003200000000madeline-0.1+git.1733505506.5c2abae/made/input.hause ascii;
use bufio;
use io;
use memio;
use strings;
use unix::poll;

// A non-textual input
export type symbol = enum {
	UP_ARROW,
	DOWN_ARROW,
	RIGHT_ARROW,
	LEFT_ARROW,
	BACKSPACE,
	DELETE,
	HOME,
	END,
	EOF,
	NOP,
};

export const symbol_str = [
	"up",
	"down",
	"right",
	"left",
	"backspace",
	"delete",
	"home",
	"end",
	"eof",
];

export type mods = enum uint {
	SHIFT = 1 << 0,
	ALT = 1 << 1,
	CTRL = 1 << 2,
};

export const mod_str = [
	"",
	"shift",
	"alt",
	"",
	"ctrl",
];

export type event = (str | ((symbol | rune), mods));

fn event_eq(a: event, b: event) bool = match (a) {
case let a: str =>
	match (b) {
	case let b: str =>
		return a == b;
	case => return false;
	};
case let a: ((symbol | rune), mods) =>
	let b = match (b) {
	case let b: ((symbol | rune), mods) =>
		yield b;
	case => return false;
	};

	if (a.1 != b.1) return false;
	let a = a.0; let b = b.0;
	match (a) {
	case let a: symbol =>
		match (b) {
		case let b: symbol => return a == b;
		case => return false;
		};
	case let a: rune =>
		match (b) {
		case let b: rune => return a == b;
		case => return false;
		};
	};
};

fn events_prefix(events: []event, prefix: []event) bool = {
	if (len(prefix) > len(events)) return false;
	for (let i = 0z; i < len(prefix); i += 1) {
		if (!event_eq(events[i], prefix[i])) return false;
	};
	return true;
};

fn events_eq(a: []event, b: []event) bool =
	len(a) == len(b) && events_prefix(a, b);

fn event_finish(a: event) void = if (a is str) free(a as str);

fn event_dup(a: event) event = match (a) {
case let a: str => return strings::dup(a);
case => return a;
};

fn events_dup(a: []event) []event = {
	a = alloc(a...);
	for (let i = 0z; i < len(a); i += 1) {
		a[i] = event_dup(a[i]);
	};
	return a;
};

fn get_event(s: *state) (event | signal | error) = {
	let r = match (bufio::read_rune(s.in)?) {
	case io::EOF =>
		return (symbol::EOF, 0): event;
	case let r: rune =>
		yield r;
	};

	if (r == '\x1b') {
		let pfd = poll::pollfd {
			fd = s.in,
			events = poll::event::POLLIN,
			...
		};
		if (poll::poll([pfd], poll::NONBLOCK)? == 0) {
			return ('\x1b', 0): event;
		};

		r = getrune(s)?;
		if (r == '[' || r == 'O') return get_csi(s);
		return (r, mods::ALT): event;
	};

	if (r == '\x7f') return (symbol::BACKSPACE, 0): event;

	if (r == '\t' || r == '\n' || r == '\r' || r: u32 >= ' ': u32) {
		return (r, 0): event;
	};

	return ((r: u32 + 0x60): rune, mods::CTRL): event;
};

fn get_csi(s: *state) (event | signal | error) = {
	let buf: []u8 = [];
	defer free(buf);
	let b = getbyte(s)?;
	for (ascii::isdigit(b: u32: rune) || b == ';'; b = getbyte(s)?) {
		append(buf, b);
	};

	let arg = strings::fromutf8(buf)?;

	let mods = switch (strings::cut(arg, ";").1) {
	case => yield 0: mods;
	case "2" => yield mods::SHIFT;
	case "3" => yield mods::ALT;
	case "4" => yield mods::SHIFT | mods::ALT;
	case "5" => yield mods::CTRL;
	case "6" => yield mods::SHIFT | mods::CTRL;
	case "7" => yield mods::ALT | mods::CTRL;
	case "8" => yield mods::SHIFT | mods::ALT | mods::CTRL;
	};

	switch (b) {
	case 'A' => return (symbol::UP_ARROW, mods): event;
	case 'B' => return (symbol::DOWN_ARROW, mods): event;
	case 'C' => return (symbol::RIGHT_ARROW, mods): event;
	case 'D' => return (symbol::LEFT_ARROW, mods): event;
	case 'H' => return (symbol::HOME, mods): event;
	case 'F' => return (symbol::END, mods): event;
	case '~' =>
		switch (strings::cut(arg, ";").0) {
		case "3" => return (symbol::DELETE, mods): event;
		case "200" =>
			return get_bracketed_paste(s);
		case => return (symbol::NOP, 0): event;
		};
	case 'R' =>
		if (len(buf) == 0) return (symbol::NOP, 0): event;
		match (cursorpos(s, strings::fromutf8(buf)?)?) {
		case void =>
			return (symbol::NOP, 0): event;
		case let ret: str =>
			return ret: finished: signal;
		};
	case => return (symbol::NOP, 0): event;
	};
};

fn get_bracketed_paste(s: *state) (event | error) = {
	let buf = memio::dynamic();
	for (strings::index(memio::string(&buf)?, "\x1b[201~") is void) {
		memio::appendrune(&buf, getrune(s)?)!;
	};
	return strings::trimsuffix(memio::string(&buf)?, "\x1b[201~"): event;
};
07070100000011000081A4000000000000000000000001675331E20000027A000000000000000000000000000000000000003400000000madeline-0.1+git.1733505506.5c2abae/made/is_done.ha// A function which decides whether to prompt for more lines,
// for example if the line is still syntactically invalid.
export type done_checker = *fn(ctx: *context, buf: []u8) bool;

// Never prompt for more lines.
export fn always_done(ctx: *context, buf: []u8) bool = true;

// Counts the line as done when it doesn't end in an open brace,
// e.g. '{', '[' or '('.
export fn balanced_braces(ctx: *context, buf: []u8) bool = {
	let braces = 0;
	for (let b .. buf) {
		if (b == '{' || b == '[' || b == '(') braces += 1;
		if (b == '}' || b == ']' || b == ')') braces -= 1;
		if (braces < 0) braces = 0;
	};
	return braces == 0;
};

07070100000012000081A4000000000000000000000001675331E200000DCD000000000000000000000000000000000000003100000000madeline-0.1+git.1733505506.5c2abae/made/line.hause ascii;
use bufio;
use encoding::utf8;
use fmt;
use io;
use os;
use strings;
use unix::tty;

// Read a line of input. Returns void when Ctrl+C has been received.
export fn line(ctx: *context) (str | void | io::EOF | error) = {
	let t = tty::open()?;
	defer io::close(t)!;
	let s = state {
		ctx = ctx,
		in = t,
		out = t,
		saved = raw(t)?,
		ret = void,
		signal = void,
		action = void,
		...
	};
	defer cook(&s): void;
	defer free(s.buf);

	s.buf = strings::toutf8(strings::dup(s.ctx.init));
	s.pos = len(s.buf);
	s.lidx = len(s.lines) + 1;
	fmt::fprint(s.out, "\x1b[6n")?;
	config_finalize(&s.ctx.cfg)?;

	for :loop (true) {
		let e = match (get_event(&s)?) {
		case let e: event => yield e;
		case let sig: signal =>
			match (sig) {
			case exit => return void;
			case let ret: finished => return ret: str;
			case io::EOF => return io::EOF;
			};
		};

		match (e) {
		case str => void;
		case let a: ((symbol | rune), mods) =>
			match (a.0) {
			case let sym: symbol =>
				if (sym == symbol::NOP) continue :loop;
			case rune => void;
			};
		};

		append(s.queued, e);
		match (handle_events(&s)?) {
		case void => void;
		case let sig: signal =>
			match (sig) {
			case exit => return void;
			case let ret: finished => return ret: str;
			case io::EOF => return io::EOF;
			};
		};
		draw(&s)?;
	};
};

fn handle_events(s: *state) (void | signal | error) = for :loop (true) {
	let cfg = s.ctx.cfg;
	let b = cfg[s.mode].bindings;
	let has_prefix = false;
	for (let i = 0z; i < len(b); i += 1) {
		let ctx = match (s.action) {
		case void => yield bctx::ACTION;
		case *action_arg => yield bctx::MOTION;
		};

		if (b[i].ctx & ctx == 0) continue;

		if (events_prefix(b[i].trigger, s.queued)) has_prefix = true;
		if (!events_prefix(s.queued, b[i].trigger)) continue;

		for (let j = 0z; j < len(b[i].trigger); j += 1) {
			event_finish(s.queued[0]);
			delete(s.queued[0]);
		};

		let a = b[i].action;
		for (let j = 0z; j < len(a); j += 1) {
			let reps = if (s.reps == 0) 1u64 else s.reps;
			s.new_reps = -1;
			defer if (s.new_reps != -1) s.reps = s.new_reps;
			defer s.reps = 0;

			match (a[j]) {
			case let m: *motion =>
				match (s.action) {
				case void =>
					for (reps > 0 && s.new_reps == -1;
							reps -= 1) {
						move(s, m);
					};
				case let a: *action_arg =>
					reps *= s.areps;
					for (reps > 0 && s.new_reps == -1;
							reps -= 1) {
						a(s, m)?;
					};
					s.action = void;
					s.areps = 0;
				};
			case let a: *action_noarg =>
				for (reps > 0 && s.new_reps == -1; reps -= 1) {
					a(s)?;
				};
			case let a: *action_arg =>
				s.action = a;
				s.areps = reps;
			};
		};
		match (s.signal) {
		case void => void;
		case let s: signal => return s;
		};
		continue :loop;
	};

	if (len(s.queued) == 0) return;

	if (!cfg[s.mode].defaultinsert) {
		if (!has_prefix) {
			event_finish(s.queued[0]);
			delete(s.queued[0]);
			continue :loop;
		};
		return;
	};

	let a = match (s.queued[0]) {
	case let a: str =>
		yield a;
	case let a: ((symbol | rune), mods) =>
		if (a.0 is symbol || a.1 != 0) {
			if (!has_prefix) {
				event_finish(s.queued[0]);
				delete(s.queued[0]);
				continue :loop;
			};
			return;
		};

		yield strings::fromutf8(utf8::encoderune(a.0 as rune))!;
	};

	// XXX: would be nice to do this in the default config instead
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL, mode::SEARCH => void;
	case mode::HIST, mode::HIST_TOK =>
		set_mode(s, mode::NORMAL);
	};

	appendstr(s, a);
	event_finish(s.queued[0]);
	delete(s.queued[0]);
};
07070100000013000081A4000000000000000000000001675331E200000925000000000000000000000000000000000000003400000000madeline-0.1+git.1733505506.5c2abae/made/motions.hause ascii;
use graph;
use strings;

// returns (start of motion, end of motion). motion(x, y).0 should usually == y
export type motion = fn(buf: []u8, pos: size) (size, size);

// keep sorted
let motionstr: [_](str, *motion) = [
	("end", &end),
	("full-line", &fullline),
	("home", &home),
	("next-char", &nextchar),
	("next-word", &nextword),
	("prev-char", &prevchar),
	("prev-word", &prevword),
];

fn home(buf: []u8, pos: size) (size, size) = (pos, 0);

fn end(buf: []u8, pos: size) (size, size) = (pos, len(buf));

fn fullline(buf: []u8, pos: size) (size, size) = (0, len(buf));

fn prevchar(buf: []u8, pos: size) (size, size) = {
	let idx = pos;
	if (idx == 0) return (pos, idx);
	idx -= 1;
	for (idx > 0 && !graph::boundary(buf, idx)!; idx -= 1) void;
	return (pos, idx);
};

fn nextchar(buf: []u8, pos: size) (size, size) = {
	let idx = pos;
	if (idx == len(buf)) return (pos, idx);
	idx += 1;
	for (idx < len(buf) && !graph::boundary(buf, idx)!; idx += 1) void;
	return (pos, idx);
};

fn prevword(buf: []u8, pos: size) (size, size) = {
	let idx = pos;
	if (idx == 0) return (pos, idx);
	idx -= 1;
	for (idx > 0 && ascii::isspace(buf[idx]: rune); idx -= 1) void;
	for (idx > 0 && !ascii::isspace(buf[idx]: rune); idx -= 1) void;
	return (pos, if (!ascii::isspace(buf[idx]: rune)) idx else idx + 1);
};

fn nextword(buf: []u8, pos: size) (size, size) = {
	let idx = pos;
	if (idx == len(buf)) return (pos, idx);
	for (idx < len(buf) && ascii::isspace(buf[idx]: rune); idx += 1) void;
	for (idx < len(buf) && !ascii::isspace(buf[idx]: rune); idx += 1) void;
	return (pos, idx);
};

fn move(s: *state, m: *motion) (size, size) = {
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL, mode::SEARCH => void;
	case mode::HIST, mode::HIST_TOK =>
		set_mode(s, mode::NORMAL);
	};

	let (start, end) = m(s.buf, s.pos);
	if (start == end) switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL =>
		if (start == len(s.buf)) {
			let hint = strings::toutf8(s.hint);
			hint = hint[..m(hint, 0).1];
			appendstr(s, strings::fromutf8(hint)!);
			end = s.pos;
		};
	case mode::SEARCH =>
		endsearch(s);
		appendstr(s, s.hint);
		let se = m(s.buf, s.pos);
		start = se.0;
		end = se.1;
	case mode::HIST, mode::HIST_TOK => abort();
	};
	s.pos = end;
	if (start > end) {
		let tmp = start;
		start = end;
		end = tmp;
	};
	return (start, end);
};
07070100000014000081A4000000000000000000000001675331E20000026C000000000000000000000000000000000000003300000000madeline-0.1+git.1733505506.5c2abae/made/prompt.hause strings;

// Used to prompt for input. Subtype this struct to make a custom prompt.
export type prompter = struct {
	// Returns the fixed text of the prompt and the pre-loaded text
	// in the input line.
	get: *fn(p: *prompter, s: *state) (str, str),
};

export type string_prompter = struct {
	prompter,
	prompt: str,
};

fn string_get(p: *prompter, s: *state) (str, str) = {
	let p = p: *string_prompter;
	return (strings::dup(p.prompt), "");
};

// Creates a [[prompter]] that prompts with a constant string.
export fn prompt_string(s: str) string_prompter = string_prompter {
	get = &string_get,
	prompt = s,
};
07070100000015000081A4000000000000000000000001675331E20000177E000000000000000000000000000000000000003200000000madeline-0.1+git.1733505506.5c2abae/made/split.hause io;
use memio;
use strings;

// Given to a [[made::complete::completer]] in order to find
// the final token in the buffer.
export type splitter = struct {
	// Returns the nth token in the buffer, the number of tokens preceding
	// it, and whether or not the requested index is past the end.
	split: *fn(buf: str, idx: size) (str, size, bool),
	// Given the preceding string for context, returns the escaped
	// value of buf, the string necessary to return to a normal escaping
	// context, and whether the escaping context was relevant.
	escape: *fn(ctx: str, buf: str) (str, str, bool),
};

// A [[splitter]] that splits on spaces and performs no escaping.
export const split_default: splitter = splitter {
	split = &default_split,
	escape = &default_escape,
};

fn default_split(buf: str, idx: size) (str, size, bool) = {
	let last = "";
	let ntok = 0z;
	let it = strings::tokenize(buf, " ");
	for (let tok => strings::next_token(&it)) {
		last = tok;
		if (ntok == idx) break;
		ntok += 1;
	};
	let end = ntok != idx;
	if (ntok > 0) ntok -= 1;
	return (strings::dup(last), ntok, end);
};

fn default_escape(ctx: str, buf: str) (str, str, bool) = {
	return (strings::dup(buf), "", true);
};

// A [[splitter]] that performs splitting and escaping as
// a shell prompt would.
export const split_sh: splitter = splitter {
	split = &sh_split,
	escape = &sh_escape,
};

// Returns the token with index `idx` or the last token for `idx` = -1.
fn sh_split(buf: str, idx: size) (str, size, bool) = {
	let out = memio::dynamic();
	let abs_ntok = 0z;
	let ntok = 0z;
	let ws = true;

	let it = strings::iter(buf);
	for (let r => strings::next(&it)) {
		if (r == ' ' || r == '\t' || r == '\n') {
			if (!ws) {
				if (abs_ntok == idx) break;
				ntok += 1;
				abs_ntok += 1;
			};
			ws = true;
			memio::reset(&out);
			continue;
		};
		ws = false;
		switch (r) {
		case '<', '>' =>
			memio::reset(&out);
			memio::appendrune(&out, r)!;

			if (r == '>') match (strings::next(&it)) {
			case done => void;
			case let r: rune =>
				if (r == '>') {
					memio::appendrune(&out, r)!;
				} else {
					strings::prev(&it);
				};
			};

			if (abs_ntok == idx) {
				break;
			};

			ntok += 1;
			abs_ntok += 1;
			memio::reset(&out);
		case ';' =>
			// TODO: reset after tokens that have a command after
			// them (eg. if, then, do)
			ntok = 0;
			ws = true;
			memio::reset(&out);
		case '\\' =>
			backslash(&out, &it);
		case '\'' =>
			for (let r => strings::next(&it)) {
				if (r == '\'') break;
				if (r == '\\') backslash(&out, &it)
				else memio::appendrune(&out, r)!;
			};
		case '"' =>
			for (let r => strings::next(&it)) {
				if (r == '"') break;
				if (r == '\\') backslash(&out, &it)
				else memio::appendrune(&out, r)!;
			};
		case =>
			memio::appendrune(&out, r)!;
		};
	};
	return (memio::string(&out)!, ntok, abs_ntok != idx);
};

fn backslash(out: io::handle, in: *strings::iterator) void = {
	let r = match (strings::next(in)) {
	case done =>
		yield '\\';
	case let r: rune =>
		yield r;
	};
	memio::appendrune(out, r)!;
};

type escapectx = enum {
	NONE,
	SINGLE,
	DOUBLE,
};

fn sh_escape(ctx: str, buf: str) (str, str, bool) = {
	let ectx = escapectx::NONE;
	let need_esc = false;
	let it = strings::iter(ctx);
	for (let r => strings::next(&it)) {
		switch (r) {
		case ' ' =>
			need_esc = false;
		case '\\' =>
			strings::next(&it);
		case '\'' =>
			for (let r => strings::next(&it)) {
				need_esc ||= needsesc(r);
				if (r == '\'') break;
				if (r == '\\') strings::next(&it);
			};
			ectx = escapectx::SINGLE;
		case '"' =>
			for (let r => strings::next(&it)) {
				need_esc ||= needsesc(r);
				if (r == '"') break;
				if (r == '\\') strings::next(&it);
			};
			ectx = escapectx::DOUBLE;
		case => void;
		};
	};

	let out = memio::dynamic();
	it = strings::iter(buf);
	for (let r => strings::next(&it)) {
		need_esc ||= needsesc(r);
		let esc = switch (ectx) {
		case escapectx::NONE =>
			yield needsesc(r);
		case escapectx::SINGLE =>
			if (r == '\'') {
				memio::concat(&out, "'\\''")!;
				continue;
			};
			yield false;
		case escapectx::DOUBLE =>
			yield r == '\\' || r == '"' || r == '$' || r == '`';
		};
		if (esc) memio::appendrune(&out, '\\')!;
		memio::appendrune(&out, r)!;
	};
	let end = switch (ectx) {
	case escapectx::NONE =>
		yield "";
	case escapectx::SINGLE =>
		yield "'";
	case escapectx::DOUBLE =>
		yield "\"";
	};
	end = strings::dup(end);
	return (memio::string(&out)!, end, ectx == escapectx::NONE || need_esc);
};

fn needsesc(r: rune) bool = r == '|' || r == '&' || r == ';' || r == '<'
	|| r == '>' || r == '(' || r == ')' || r == '$' || r == '`' || r == '\\'
	|| r == '"' || r == '\'' || r == ' ' || r == '\t' || r == '\n'
	|| condesc(r);

// XXX?
fn condesc(r: rune) bool = r == '*' || r == '?' || r == '[' || r == '#'
	|| r == '~' || r == '=' || r == '%';

@test fn sh_split() void = {
	const (token, ntok, end) = sh_split("echo test", -1);
	assert(token == "test" && ntok == 1 && end);

	const (token, ntok, end) = sh_split("echo \"hello world\"", -1);
	assert(token == "hello world" && ntok == 1 && end);

	const (token, ntok, end) = sh_split("echo $1", -1);
	assert(token == "$1" && ntok == 1 && end);

	const (token, ntok, end) = sh_split("echo \"$1\"", -1);
	assert(token == "$1" && ntok == 1 && end);

	const (token, ntok, end) = sh_split("echo (1 2 3)", -1);
	assert(token == "3)" && ntok == 3 && end);

	const (token, ntok, end) = sh_split("echo a; echo b", -1);
	assert(token == "b" && ntok == 1 && end);

	const (token, ntok, end) = sh_split("mv foo bar", -1);
	assert(token == "bar" && ntok == 2 && end);

	const (token, ntok, end) = sh_split("mv foo bar", 0);
	assert(token == "mv" && ntok == 0 && !end);

	const (token, ntok, end) = sh_split("mv foo bar", 1);
	assert(token == "foo" && ntok == 1 && !end);

	const (token, ntok, end) = sh_split("mv foo bar", 2);
	assert(token == "bar" && ntok == 2 && !end);

	const (token, ntok, end) = sh_split("mv foo bar", 3);
	assert(token == "bar" && ntok == 2 && end);
};
07070100000016000081A4000000000000000000000001675331E200000350000000000000000000000000000000000000003200000000madeline-0.1+git.1733505506.5c2abae/made/table.hause hash::fnv;
use strings;

type table = struct {
	buckets: [][](u32, str),
	items: size,
};

fn table_insert(t: *table, s: str) bool = {
	let hash = fnv::string32(s);
	if (t.items >= len(t.buckets) * 8) {
		let old = *t;
		defer table_finish(old);
		t.buckets = alloc([[]...], (t.items + 1) * 4);
		for (let i = 0z; i < len(old.buckets); i += 1) {
			let b = old.buckets[i];
			for (let j = 0z; j < len(b); j += 1) {
				append(t.buckets[b[j].0 % len(t.buckets)], b[j]);
			};
		};
	};
	let bucket = &t.buckets[hash % len(t.buckets)];
	for (let i = 0z; i < len(bucket); i += 1) {
		if (bucket[i].0 == hash && bucket[i].1 == s) {
			return false;
		};
	};
	append(bucket, (hash, s));
	t.items += 1;
	return true;
};

fn table_finish(t: table) void = {
	for (let i = 0z; i < len(t.buckets); i += 1) {
		free(t.buckets[i]);
	};
	free(t.buckets);
};
07070100000017000081A4000000000000000000000001675331E200000FDB000000000000000000000000000000000000003100000000madeline-0.1+git.1733505506.5c2abae/made/term.hause ascii;
use fmt;
use io;
use rt::{tcflag};
use memio;
use strconv;
use strings;
use unix::tty;

fn draw(s: *state) (void | error) = {
	update_hint(s);
	if (s.pasting || s.lidx != len(s.lines)) return;
	s.lidx = 0;
	let buf = memio::dynamic();
	defer io::close(&buf)!;
	fmt::fprint(&buf, "\x1b[?1049h\x1b[H\x1b[2J")?;
	dumpstate(s, &buf, true)?;
	fmt::fprint(&buf, "\x1b[?1049l")?;
	io::writeall(s.out, memio::buffer(&buf))?;
};

fn dumpstr(out: io::handle, s: str) (void | io::error) = {
	let it = strings::iter(s);
	for (let r => strings::next(&it)) {
		if (!ascii::iscntrl(r) || r == '\n') {
			fmt::fprint(out, r)?;
			continue;
		};
		fmt::fprintf(out, "\x1b[4m^{}\x1b[24m", (r: u32 + '@'): rune)?;
	};
};

fn dumpstate(s: *state, out: io::handle, getsz: bool) (void | error) = {
	let (pre, post) = s.ctx.prompt.get(s.ctx.prompt, s);
	defer free(pre);
	defer free(post);
	fmt::fprint(out, pre)?;
	if (s.mode == mode::SEARCH) {
		if (s.hint == "") {
			fmt::fprint(out, "\n\x1b[2;3m[^r failed]\x1b[0m ")?;
		} else {
			let buf = strings::fromutf8(s.buf)!;
			let (before, after) = if (buf != "") {
				yield strings::cut(s.hint, buf);
			} else {
				yield (s.hint, "");
			};
			fmt::fprint(out, "\x1b[2;3m")?;
			dumpstr(out, before)?;
			fmt::fprint(out, "\x1b[0m")?;
			dumpstr(out, buf)?;
			fmt::fprint(out, "\x1b[2;3m")?;
			dumpstr(out, after)?;
			fmt::fprint(out, "\n\x1b[2;3m[^r]\x1b[0m ")?;
		};
	};
	dumpstr(out, strings::fromutf8(s.buf[..s.pos])!)?;
	if (s.mode == mode::HIST_TOK) {
		assert(s.pos == len(s.buf));
		dumpstr(out, s.hint)?;
	};
	fmt::fprint(out, " \b\x1b7")?;
	dumpstr(out, strings::fromutf8(s.buf[s.pos..])!)?;
	if (s.ret is str) {
		if (getsz) fmt::fprint(out, "\x1b[6n\x1b[6n")?;
		return;
	};
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL =>
		if (s.hint != "") {
			fmt::fprint(out, "\x1b[2;3m")?;
			dumpstr(out, s.hint)?;
			fmt::fprint(out, "\x1b[0m")?;
		};
	case mode::HIST => fmt::fprint(out, " \x1b[2;3m(hist)\x1b[0m")?;
	case mode::HIST_TOK => fmt::fprint(out, " \x1b[2;3m(hist tok)\x1b[0m")?;
	case mode::SEARCH => void;
	};
	if (s.mode != mode::SEARCH && post != "") {
		fmt::fprintf(out, "\n\x1b[2;3m{}\x1b[0m", post)?;
	};
	let (base, cs) = s.completions;
	if (len(cs) != 0) {
		fmt::fprintln(out)?;
		dumpstr(out, base)?;
		fmt::fprint(out, "\x1b[2;3m")?;
		dumpstr(out, cs[0].0)?;
		for (let i = 1z; i < len(cs); i += 1) {
			fmt::fprint(out, " \x1b[0m| ")?;
			dumpstr(out, base)?;
			fmt::fprint(out, "\x1b[2;3m")?;
			dumpstr(out, cs[i].0)?;
		};
		fmt::fprint(out, "\x1b[0m")?;
	};
	if (getsz) fmt::fprint(out, "\x1b[6n")?;
	fmt::fprint(out, "\x1b8")?;
	if (getsz) fmt::fprint(out, "\x1b[6n")?;
};

fn cursorpos(s: *state, buf: str) (str | void | error) = {
	let (row, col) = strings::cut(buf, ";");
	let lines = strconv::stou16(row)? - 1;
	if (s.lidx >= len(s.lines)) {
		// initial missing-newline check
		let col = strconv::stou16(col)? - 1;
		if (col != 0) fmt::fprintln(s.out, "\x1b[2;3m⏎\x1b[0m")?;
		s.lidx = len(s.lines);
		draw(s)?;
		return;
	};
	let old = s.lines[s.lidx];
	s.lines[s.lidx] = lines;
	s.lidx += 1;
	if (s.lidx < len(s.lines)) {
		return;
	};

	let buf = memio::dynamic();
	defer io::close(&buf)!;
	if (old > 0) fmt::fprintf(&buf, "\x1b[{}A", old)?;
	if (s.lines[0] > 0) {
		for (let i = 0z; i < s.lines[0]; i += 1) {
			fmt::fprintln(&buf)?;
		};
		fmt::fprintf(&buf, "\x1b[{}A", s.lines[0])?;
	};
	fmt::fprint(&buf, "\r\x1b[J")?;
	dumpstate(s, &buf, false)?;
	io::writeall(s.out, memio::buffer(&buf))?;
	freecompletions(s);
	return s.ret;
};

fn raw(term: io::file) (tty::termios | error) = {
	let tios = tty::termios_query(term)?;
	tios.current.c_iflag &= ~(tcflag::IXON | tcflag::IGNBRK |
		tcflag::BRKINT | tcflag::INLCR | tcflag::IGNCR | tcflag::ICRNL);
	tios.current.c_lflag &= ~(tcflag::ECHO | tcflag::ECHONL |
		tcflag::ICANON | tcflag::IEXTEN | tcflag::ISIG);
	tty::termios_set(&tios)?;
	fmt::fprint(term, "\x1b[?2004h")?;
	return tios;
};

fn cook(s: *state) (void | error) = {
	tty::termios_restore(&s.saved);
	fmt::fprintln(s.out, "\x1b[?2004r")?;
};
07070100000018000081A4000000000000000000000001675331E200000881000000000000000000000000000000000000003200000000madeline-0.1+git.1733505506.5c2abae/made/types.hause encoding::utf8;
use errors;
use format::ini;
use fs;
use io;
use strconv;
use unix::tty;
use unix::poll;

export type eof = !void;

export type config_error = !str;

export type error = !(utf8::invalid | fs::error | eof | errors::error |
	io::error | strconv::invalid | strconv::overflow | tty::error
	| ini::error | config_error | poll::error);

export type mode = enum {
	NORMAL,
	SEARCH,
	HIST,
	HIST_TOK,
	VI_NORMAL,
	LAST = VI_NORMAL,
};

export type exit = void;

export type finished = str;

export type signal = (exit | finished | io::EOF);

export type state = struct {
	ctx: *context,
	in: io::file,
	out: io::handle,
	buf: []u8,
	pos: size,
	mode: mode,
	completions: (str, [](str, str)),
	hint: str,
	pasting: bool,
	lines: [2]u16,
	lidx: size,
	saved: tty::termios,
	ret: (str | void),

	// XXX: might be able to integrate this with ret?
	signal: (signal | void),

	reps: u64,
	new_reps: u64,
	areps: u64,
	queued: []event,
	action: (*action_arg | void),
};

// Context for a sequence of calls to [[line]].
export type context = struct {
	complete: *completer,
	hint: *hinter,
	hist: *history,
	prompt: *prompter,
	split: splitter,
	check_done: done_checker,
	kill: [][]u8,
	init: str,
	cfg: config,
};

// Frees resources associated with a [[context]].
export fn ctx_finish(ctx: *context) (void | io::error) = {
	hist_finish(ctx.hist)?;
	for (let i = 0z; i < len(ctx.kill); i += 1) {
		free(ctx.kill[i]);
	};
	free(ctx.kill);
};

// Converts a made [[error]] into a user-friendly string.
export fn strerror(e: error) str = match (e) {
case let e: utf8::invalid =>
	return utf8::strerror(e);
case let e: fs::error =>
	return fs::strerror(e);
case eof =>
	return "Unexpected EOF";
case let e: errors::error =>
	return errors::strerror(e);
case let e: io::error =>
	return io::strerror(e);
case strconv::invalid =>
	return "Invalid integer from terminal (shouldn't happen)";
case strconv::overflow =>
	return "Integer overflow from terminal (shouldn't happen)";
case let e: tty::error =>
	return tty::strerror(e);
case let e: ini::error =>
	return ini::strerror(e);
case let e: config_error =>
	return e;
case let e: poll::error =>
	return poll::strerror(e);
};
07070100000019000081A4000000000000000000000001675331E200000A46000000000000000000000000000000000000003100000000madeline-0.1+git.1733505506.5c2abae/made/util.hause bufio;
use encoding::utf8;
use io;
use memio;
use os;
use strings;

fn clear(s: *state) void = {
	delete(s.buf[..]);
	s.pos = 0;
};

fn appendrune(s: *state, r: rune) void = {
	let buf = utf8::encoderune(r);
	insert(s.buf[s.pos], buf...);
	s.pos += len(buf);
};

fn appendstr(s: *state, st: str) void = {
	insert(s.buf[s.pos], strings::toutf8(st)...);
	s.pos += len(strings::toutf8(st));
};

fn getbyte(s: *state) (u8 | error) = match (bufio::read_byte(s.in)?) {
case io::EOF =>
	return eof;
case let b: u8 =>
	return b;
};

fn getrune(s: *state) (rune | error) = match (bufio::read_rune(s.in)?) {
case io::EOF =>
	return eof;
case let r: rune =>
	return r;
};

fn prefix(strs: [](str, str)) str = {
	let its: []strings::iterator = [];
	defer free(its);
	for (let i = 0z; i < len(strs); i += 1) {
		append(its, strings::iter(strs[i].0));
	};
	let ret = memio::dynamic();
	for :loop (len(its) > 0) {
		let r = match (strings::next(&its[0])) {
		case done =>
			break;
		case let r: rune =>
			yield r;
		};
		for (let i = 1z; i < len(its); i += 1) {
			match (strings::next(&its[i])) {
			case done =>
				break :loop;
			case let r2: rune =>
				if (r != r2) break :loop;
			};
		};
		memio::appendrune(&ret, r)!;
	};
	return memio::string(&ret)!;
};

fn freecompletions(s: *state) void = {
	free(s.completions.0);
	for (let i = 0z; i < len(s.completions.1); i += 1) {
		free(s.completions.1[i].0);
		free(s.completions.1[i].1);
	};
	free(s.completions.1);
	s.completions = ("", []);
};

fn update_hint(s: *state) void = {
	if (s.ret is str) return;
	switch (s.mode) {
	case mode::NORMAL, mode::VI_NORMAL =>
		s.hint = s.ctx.hint(s.ctx, s.buf);
	case mode::SEARCH =>
		update_search_hint(s);
	case mode::HIST => void;
	case mode::HIST_TOK =>
		s.hint = s.ctx.hist.tok;
	};
};

fn update_search_hint(s: *state) void = {
	let buf = strings::fromutf8(s.buf)!;
	let h = &s.ctx.hist;
	s.hint = "";
	for (let i = h.hidx + 1; i > 0; i -= 1) if (i <= len(h.hist)) {
		let i = i - 1;
		if (strings::contains(h.hist[i], buf)) {
			s.hint = h.hist[i];
			h.hidx = i;
			break;
		};
	};
};

fn set_mode(s: *state, m: mode) void = {
	if (m == s.mode) return;
	switch (s.mode) {
	case mode::NORMAL, mode::HIST, mode::SEARCH, mode::VI_NORMAL => void;
	case mode::HIST_TOK =>
		appendstr(s, s.hint);
	};
	s.mode = m;
};

export fn modestr(m: mode) str = switch (m) {
case mode::NORMAL => return "normal";
case mode::SEARCH => return "search";
case mode::HIST => return "hist";
case mode::HIST_TOK => return "hist_tok";
case mode::VI_NORMAL => return "vi_normal";
};

fn endsearch(s: *state) void = {
	clear(s);
	set_mode(s, mode::NORMAL);
};
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!254 blocks
openSUSE Build Service is sponsored by