// File: /workspace/github_cpp_makefile_star2_O3/AndrewAlbert[P]Compiler-Theory/SourceCode/scanner.cpp
// Function: Scanner::InitScanner(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
bool Scanner::InitScanner(string filename, bool debug_input){
	debug = debug_input;
	line_number = 1;
	fPtr = fopen(filename.c_str(),"r");
	if (fPtr == nullptr){
		cout << "\nThe file: " << filename << "\ndoes not exist, or cannot be opened.\n" << endl;
		return false;
	}

	//Populate the reserved keyword table
	reserved_table[";"] = T_SEMICOLON;
	reserved_table["("] = T_LPAREN;
	reserved_table[")"] = T_RPAREN;
	reserved_table[":="] = T_ASSIGNMENT;
	reserved_table[">="] = T_COMPARE;
	reserved_table[">"] = T_COMPARE;
	reserved_table["<="] = T_COMPARE;
	reserved_table["<"] = T_COMPARE;
	reserved_table["/"] = T_DIVIDE;
	reserved_table["*"] = T_MULTIPLY;
	reserved_table["+"] = T_ADD;
	reserved_table["-"] = T_SUBTRACT;
	reserved_table[","] = T_COMMA;
	reserved_table["["] = T_LBRACKET;
	reserved_table["]"] = T_RBRACKET;
	reserved_table["PROGRAM"] = T_PROGRAM;
	reserved_table["IS"] = T_IS;
	reserved_table["BEGIN"] = T_BEGIN;
	reserved_table["END"] = T_END;
	reserved_table["GLOBAL"] = T_GLOBAL;
	reserved_table["PROCEDURE"] = T_PROCEDURE;
	reserved_table["IN"] = T_IN;
	reserved_table["OUT"] = T_OUT;
	reserved_table["INOUT"] = T_INOUT;
	reserved_table["INTEGER"] = T_INTEGER;
	reserved_table["FLOAT"] = T_FLOAT;
	reserved_table["BOOL"] = T_BOOL;
	reserved_table["STRING"] = T_STRING;
	reserved_table["CHAR"] = T_CHAR;
	reserved_table["NOT"] = T_NOT;
	reserved_table["IF"] = T_IF;
	reserved_table["THEN"] = T_THEN;
	reserved_table["ELSE"] = T_ELSE;
	reserved_table["FOR"] = T_FOR;
	reserved_table["RETURN"] = T_RETURN;
	reserved_table["TRUE"] = T_TRUE;
	reserved_table["FALSE"] = T_FALSE;
	return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r15
movq %rdi, %r14
movb %dl, 0x138(%rdi)
movl $0x1, (%rdi)
movq (%rsi), %rdi
leaq 0x18263(%rip), %rsi     # 0x1a920
callq 0x2250
movq %rax, %rbx
movq %rax, 0x130(%r14)
testq %rax, %rax
je 0x3024
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x169ca(%rip), %rsi     # 0x190af
leaq 0x169c4(%rip), %rdx     # 0x190b0
movq %rsp, %rdi
callq 0x3c42
addq $0x140, %r14            # imm = 0x140
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x12c, (%rax)          # imm = 0x12C
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2722
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16982(%rip), %rsi     # 0x190b1
leaq 0x1697c(%rip), %rdx     # 0x190b2
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x12d, (%rax)          # imm = 0x12D
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2762
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x17fd2(%rip), %rsi     # 0x1a741
leaq 0x17fcc(%rip), %rdx     # 0x1a742
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x12e, (%rax)          # imm = 0x12E
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x27a2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16904(%rip), %rsi     # 0x190b3
leaq 0x168ff(%rip), %rdx     # 0x190b5
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x13a, (%rax)          # imm = 0x13A
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x27e2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x168c7(%rip), %rsi     # 0x190b6
leaq 0x168c2(%rip), %rdx     # 0x190b8
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x139, (%rax)          # imm = 0x139
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2822
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1688a(%rip), %rsi     # 0x190b9
leaq 0x16884(%rip), %rdx     # 0x190ba
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x139, (%rax)          # imm = 0x139
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2862
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1684c(%rip), %rsi     # 0x190bb
leaq 0x16847(%rip), %rdx     # 0x190bd
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x139, (%rax)          # imm = 0x139
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x28a2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1680f(%rip), %rsi     # 0x190be
leaq 0x16809(%rip), %rdx     # 0x190bf
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x139, (%rax)          # imm = 0x139
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x28e2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x167d1(%rip), %rsi     # 0x190c0
leaq 0x167cb(%rip), %rdx     # 0x190c1
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x130, (%rax)          # imm = 0x130
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2922
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1843b(%rip), %rsi     # 0x1ad6a
leaq 0x18435(%rip), %rdx     # 0x1ad6b
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x131, (%rax)          # imm = 0x131
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2962
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16753(%rip), %rsi     # 0x190c2
leaq 0x1674d(%rip), %rdx     # 0x190c3
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x132, (%rax)          # imm = 0x132
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x29a2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x17f32(%rip), %rsi     # 0x1a8e1
leaq 0x17f2c(%rip), %rdx     # 0x1a8e2
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x133, (%rax)          # imm = 0x133
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x29e2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x166d5(%rip), %rsi     # 0x190c4
leaq 0x166cf(%rip), %rdx     # 0x190c5
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x134, (%rax)          # imm = 0x134
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2a22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1852c(%rip), %rsi     # 0x1af5b
leaq 0x18526(%rip), %rdx     # 0x1af5c
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x135, (%rax)          # imm = 0x135
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2a62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16657(%rip), %rsi     # 0x190c6
leaq 0x16651(%rip), %rdx     # 0x190c7
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x136, (%rax)          # imm = 0x136
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2aa2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16619(%rip), %rsi     # 0x190c8
leaq 0x16619(%rip), %rdx     # 0x190cf
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x101, (%rax)          # imm = 0x101
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ae2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x165e1(%rip), %rsi     # 0x190d0
leaq 0x165dc(%rip), %rdx     # 0x190d2
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x102, (%rax)          # imm = 0x102
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2b22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x165a4(%rip), %rsi     # 0x190d3
leaq 0x165a2(%rip), %rdx     # 0x190d8
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x103, (%rax)          # imm = 0x103
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2b62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1656a(%rip), %rsi     # 0x190d9
leaq 0x16566(%rip), %rdx     # 0x190dc
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x104, (%rax)          # imm = 0x104
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ba2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1652e(%rip), %rsi     # 0x190dd
leaq 0x1652d(%rip), %rdx     # 0x190e3
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x105, (%rax)          # imm = 0x105
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2be2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x164f5(%rip), %rsi     # 0x190e4
leaq 0x164f7(%rip), %rdx     # 0x190ed
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x106, (%rax)          # imm = 0x106
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2c22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x164a7(%rip), %rsi     # 0x190d6
leaq 0x164a2(%rip), %rdx     # 0x190d8
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x107, (%rax)          # imm = 0x107
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2c62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16481(%rip), %rsi     # 0x190f0
leaq 0x1647d(%rip), %rdx     # 0x190f3
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x108, (%rax)          # imm = 0x108
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ca2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1643f(%rip), %rsi     # 0x190ee
leaq 0x1643d(%rip), %rdx     # 0x190f3
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x109, (%rax)          # imm = 0x109
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ce2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16615(%rip), %rsi     # 0x19304
leaq 0x16615(%rip), %rdx     # 0x1930b
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x10a, (%rax)          # imm = 0x10A
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2d22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x165e0(%rip), %rsi     # 0x1930f
leaq 0x165de(%rip), %rdx     # 0x19314
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x10b, (%rax)          # imm = 0x10B
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2d62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1658d(%rip), %rsi     # 0x192fc
leaq 0x1658a(%rip), %rdx     # 0x19300
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x10c, (%rax)          # imm = 0x10C
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2da2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16569(%rip), %rsi     # 0x19318
leaq 0x16568(%rip), %rdx     # 0x1931e
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x10d, (%rax)          # imm = 0x10D
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2de2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16533(%rip), %rsi     # 0x19322
leaq 0x16530(%rip), %rdx     # 0x19326
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x10e, (%rax)          # imm = 0x10E
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2e22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x162c5(%rip), %rsi     # 0x190f4
leaq 0x162c1(%rip), %rdx     # 0x190f7
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x10f, (%rax)          # imm = 0x10F
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2e62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16289(%rip), %rsi     # 0x190f8
leaq 0x16284(%rip), %rdx     # 0x190fa
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x110, (%rax)          # imm = 0x110
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ea2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1624c(%rip), %rsi     # 0x190fb
leaq 0x16249(%rip), %rdx     # 0x190ff
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x111, (%rax)          # imm = 0x111
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ee2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16211(%rip), %rsi     # 0x19100
leaq 0x1620e(%rip), %rdx     # 0x19104
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x112, (%rax)          # imm = 0x112
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2f22
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x161d6(%rip), %rsi     # 0x19105
leaq 0x161d2(%rip), %rdx     # 0x19108
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x113, (%rax)          # imm = 0x113
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2f62
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x1619a(%rip), %rsi     # 0x19109
leaq 0x16199(%rip), %rdx     # 0x1910f
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x114, (%rax)          # imm = 0x114
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2fa2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16161(%rip), %rsi     # 0x19110
leaq 0x1615e(%rip), %rdx     # 0x19114
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x115, (%rax)          # imm = 0x115
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2fe2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x16126(%rip), %rsi     # 0x19115
leaq 0x16124(%rip), %rdx     # 0x1911a
callq 0x3c42
movq %rsp, %rsi
movq %r14, %rdi
callq 0x3ab8
movl $0x116, (%rax)          # imm = 0x116
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x308c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x308c
movq 0x1efad(%rip), %r14     # 0x21fd8
leaq 0x1604a(%rip), %rsi     # 0x1907c
movl $0xb, %edx
movq %r14, %rdi
callq 0x2230
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x2230
movq %rax, %r14
leaq 0x16030(%rip), %rsi     # 0x19088
movl $0x26, %edx
movq %rax, %rdi
callq 0x2230
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2140
testq %rbx, %rbx
setne %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
jmp 0x315f
jmp 0x317a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x317d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x317d
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2330
nop