// File: /workspace/github_cpp_makefile_star2_O1/Davidc2525[P]Leaf/parser/Scanner.cpp
// Function: Scanner::Init()
void Scanner::Init() {
	EOL    = '\n';
	eofSym = 0;
	maxT = 50;
	noSym = 50;
	int i;
	for (i = 49; i <= 57; ++i) start.set(i, 28);
	for (i = 65; i <= 90; ++i) start.set(i, 2);
	for (i = 95; i <= 95; ++i) start.set(i, 2);
	for (i = 97; i <= 122; ++i) start.set(i, 2);
	for (i = 145; i <= 145; ++i) start.set(i, 2);
	for (i = 177; i <= 177; ++i) start.set(i, 2);
	for (i = 195; i <= 195; ++i) start.set(i, 2);
	start.set(42, 1);
	start.set(38, 56);
	start.set(39, 3);
	start.set(34, 6);
	start.set(46, 57);
	start.set(48, 29);
	start.set(123, 32);
	start.set(125, 33);
	start.set(59, 34);
	start.set(61, 58);
	start.set(40, 35);
	start.set(41, 36);
	start.set(58, 37);
	start.set(44, 38);
	start.set(91, 39);
	start.set(93, 40);
	start.set(60, 59);
	start.set(62, 60);
	start.set(126, 43);
	start.set(124, 61);
	start.set(94, 44);
	start.set(33, 48);
	start.set(43, 52);
	start.set(45, 53);
	start.set(47, 54);
	start.set(37, 55);
		start.set(Buffer::EoF, -1);
	keywords.set(L"class", 13);
	keywords.set(L"print", 14);
	keywords.set(L"sizeof", 17);
	keywords.set(L"ret", 18);
	keywords.set(L"if", 19);
	keywords.set(L"else", 20);
	keywords.set(L"throw", 21);
	keywords.set(L"try", 22);
	keywords.set(L"catch", 23);
	keywords.set(L"extern", 28);
	keywords.set(L"fun", 29);
	keywords.set(L"true", 47);
	keywords.set(L"false", 48);


	tvalLength = 128;
	tval = new wchar_t[tvalLength]; // text of current token

	// COCO_HEAP_BLOCK_SIZE byte heap + pointer to next heap block
	heap = malloc(COCO_HEAP_BLOCK_SIZE + sizeof(void*));
	firstHeap = heap;
	heapEnd = (void**) (((char*) heap) + COCO_HEAP_BLOCK_SIZE);
	*heapEnd = 0;
	heapTop = heap;
	if (sizeof(Token) > COCO_HEAP_BLOCK_SIZE) {
		printf("--- Too small COCO_HEAP_BLOCK_SIZE\n");
		exit(1);
	}

	pos = -1; line = 1; col = 0; charPos = -1;
	oldEols = 0;
	NextCh();
	if (ch == 0xEF) { // check optional byte order mark for UTF-8
		NextCh(); int ch1 = ch;
		NextCh(); int ch2 = ch;
		if (ch1 != 0xBB || ch2 != 0xBF) {
			printf("Illegal byte order mark at start of file");
			exit(1);
		}
		Buffer *oldBuf = buffer;
		buffer = new UTF8Buffer(buffer); col = 0; charPos = -1;
		delete oldBuf; oldBuf = NULL;
		NextCh();
	}


	pt = tokens = CreateToken(); // first token is a dummy
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0xa, 0x20(%rdi)
movabsq $0x3200000000, %rax     # imm = 0x3200000000
movq %rax, 0x24(%rdi)
movl $0x32, 0x2c(%rdi)
movl $0x31, %r14d
movl $0x10, %edi
callq 0x5290
movl %r14d, (%rax)
movl $0x1c, 0x4(%rax)
movq $0x0, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq (%rcx,%r14,8), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq $0x3a, %r14
jne 0x9c25
movl $0x41, %r14d
movl $0x10, %edi
callq 0x5290
movl %r14d, (%rax)
movl $0x2, 0x4(%rax)
movq $0x0, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq (%rcx,%r14,8), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq $0x5b, %r14
jne 0x9c60
movl $0x10, %edi
callq 0x5290
movabsq $0x20000005f, %rcx      # imm = 0x20000005F
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x2f8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x2f8(%rcx)
movl $0x61, %r14d
movl $0x10, %edi
callq 0x5290
movl %r14d, (%rax)
movl $0x2, 0x4(%rax)
movq $0x0, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq (%rcx,%r14,8), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq $0x7b, %r14
jne 0x9cd0
movl $0x10, %edi
callq 0x5290
movabsq $0x200000091, %rcx      # imm = 0x200000091
movq %rcx, (%rax)
xorl %r15d, %r15d
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x88(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x88(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x2000000b1, %rcx      # imm = 0x2000000B1
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x188(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x188(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x2000000c3, %rcx      # imm = 0x2000000C3
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x218(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x218(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x10000002a, %rcx      # imm = 0x10000002A
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x150(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x150(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3800000026, %rcx     # imm = 0x3800000026
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x130(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x130(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x300000027, %rcx      # imm = 0x300000027
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x138(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x138(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x600000022, %rcx      # imm = 0x600000022
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x110(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x110(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x390000002e, %rcx     # imm = 0x390000002E
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x170(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x170(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x1d00000030, %rcx     # imm = 0x1D00000030
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x180(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x180(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x200000007b, %rcx     # imm = 0x200000007B
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x3d8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x3d8(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x210000007d, %rcx     # imm = 0x210000007D
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x3e8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x3e8(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x220000003b, %rcx     # imm = 0x220000003B
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x1d8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x1d8(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3a0000003d, %rcx     # imm = 0x3A0000003D
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x1e8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x1e8(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x2300000028, %rcx     # imm = 0x2300000028
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x140(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x140(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x2400000029, %rcx     # imm = 0x2400000029
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x148(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x148(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x250000003a, %rcx     # imm = 0x250000003A
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x1d0(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x1d0(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x260000002c, %rcx     # imm = 0x260000002C
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x160(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x160(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x270000005b, %rcx     # imm = 0x270000005B
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x2d8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x2d8(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x280000005d, %rcx     # imm = 0x280000005D
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x2e8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x2e8(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3b0000003c, %rcx     # imm = 0x3B0000003C
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x1e0(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x1e0(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3c0000003e, %rcx     # imm = 0x3C0000003E
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x1f0(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x1f0(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x2b0000007e, %rcx     # imm = 0x2B0000007E
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x3f0(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x3f0(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3d0000007c, %rcx     # imm = 0x3D0000007C
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x3e0(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x3e0(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x2c0000005e, %rcx     # imm = 0x2C0000005E
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x2f0(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x2f0(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3000000021, %rcx     # imm = 0x3000000021
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x108(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x108(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x340000002b, %rcx     # imm = 0x340000002B
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x158(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x158(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x350000002d, %rcx     # imm = 0x350000002D
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x168(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x168(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x360000002f, %rcx     # imm = 0x360000002F
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x178(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x178(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $0x3700000025, %rcx     # imm = 0x3700000025
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq 0x128(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, 0x128(%rcx)
movl $0x10, %edi
callq 0x5290
movabsq $-0xffff0000, %rcx      # imm = 0xFFFFFFFF00010000
movq %rcx, (%rax)
movq %r15, 0x8(%rax)
movq 0x40(%rbx), %rcx
movq (%rcx), %rdx
movq %rdx, 0x8(%rax)
movq %rax, (%rcx)
leaq 0x48(%rbx), %r14
leaq 0xf37b(%rip), %rsi      # 0x19644
movq %r14, %rdi
movl $0xd, %edx
callq 0xb884
leaq 0xf37f(%rip), %rsi      # 0x1965c
movq %r14, %rdi
movl $0xe, %edx
callq 0xb884
leaq 0xf383(%rip), %rsi      # 0x19674
movq %r14, %rdi
movl $0x11, %edx
callq 0xb884
leaq 0xf38b(%rip), %rsi      # 0x19690
movq %r14, %rdi
movl $0x12, %edx
callq 0xb884
leaq 0xf387(%rip), %rsi      # 0x196a0
movq %r14, %rdi
movl $0x13, %edx
callq 0xb884
leaq 0xf37f(%rip), %rsi      # 0x196ac
movq %r14, %rdi
movl $0x14, %edx
callq 0xb884
leaq 0xf37f(%rip), %rsi      # 0x196c0
movq %r14, %rdi
movl $0x15, %edx
callq 0xb884
leaq 0xf383(%rip), %rsi      # 0x196d8
movq %r14, %rdi
movl $0x16, %edx
callq 0xb884
leaq 0xf37f(%rip), %rsi      # 0x196e8
movq %r14, %rdi
movl $0x17, %edx
callq 0xb884
leaq 0xf383(%rip), %rsi      # 0x19700
movq %r14, %rdi
movl $0x1c, %edx
callq 0xb884
leaq 0xf38b(%rip), %rsi      # 0x1971c
movq %r14, %rdi
movl $0x1d, %edx
callq 0xb884
leaq 0xf387(%rip), %rsi      # 0x1972c
movq %r14, %rdi
movl $0x2f, %edx
callq 0xb884
leaq 0xf387(%rip), %rsi      # 0x19740
movq %r14, %rdi
movl $0x30, %edx
callq 0xb884
movl $0x80, 0x68(%rbx)
movl $0x200, %edi            # imm = 0x200
callq 0x5040
movq %rax, 0x60(%rbx)
movl $0x4000008, %edi        # imm = 0x4000008
callq 0x5370
movq %rax, 0x8(%rbx)
movq %rax, (%rbx)
leaq 0x4000000(%rax), %rcx
movq %rcx, 0x18(%rbx)
movq %r15, 0x4000000(%rax)
movq %rax, 0x10(%rbx)
movaps 0xf057(%rip), %xmm0     # 0x19460
movups %xmm0, 0x84(%rbx)
movl $0x0, 0x94(%rbx)
movq %rbx, %rdi
callq 0xa786
cmpl $0xef, 0x80(%rbx)
jne 0xa4fe
movq %rbx, %rdi
callq 0xa786
movl 0x80(%rbx), %ebp
movq %rbx, %rdi
callq 0xa786
cmpl $0xbb, %ebp
jne 0xa53a
cmpl $0xbf, 0x80(%rbx)
jne 0xa53a
movq 0x98(%rbx), %r14
movl $0x38, %edi
callq 0x5290
leaq 0x1ae94(%rip), %rcx     # 0x25310
movq %rcx, (%rax)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rax)
movl 0x10(%r14), %ecx
movl %ecx, 0x10(%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%r14)
movl 0x14(%r14), %edx
movl %edx, 0x14(%rax)
movl 0x18(%r14), %edx
movl %edx, 0x18(%rax)
movl 0x1c(%r14), %edx
movl %edx, 0x1c(%rax)
movl 0x20(%r14), %edx
movl %edx, 0x20(%rax)
movq 0x28(%r14), %rdx
movq %rdx, 0x28(%rax)
movq %rcx, 0x28(%r14)
movb 0x30(%r14), %cl
movb %cl, 0x30(%rax)
leaq 0x1ae96(%rip), %rcx     # 0x25360
movq %rcx, (%rax)
movq %rax, 0x98(%rbx)
movl $0x0, 0x90(%rbx)
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
testq %r14, %r14
je 0xa4f6
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq %rbx, %rdi
callq 0xa786
movq 0x10(%rbx), %rax
addq $0x28, %rax
cmpq 0x18(%rbx), %rax
jb 0xa514
movq %rbx, %rdi
callq 0xab3a
movq 0x10(%rbx), %rax
leaq 0x28(%rax), %rcx
movq %rcx, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq %rax, 0x70(%rbx)
movq %rax, 0x78(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf0c0(%rip), %rdi      # 0x19601
xorl %eax, %eax
callq 0x5070
movl $0x1, %edi
callq 0x5340