// File: martinda3[P]Compiler/src/TClexer.cpp
// Function: toyc::getChar()
char getChar() {
		std::string holder;
//		do {
//			//if (infile.eof()) { return EOFCHAR; }
//			if (line.empty() || pos > line.length()) { line = getNextLine(); }
//			char ch = line[pos]; holder = ch;
//			if ((ch == '.')) {
//				if (isspace(line[pos + 1])) {
//					reportWARNING("  ", " Scanner: '.' Illegal Character. Ignoring"); pos++;
//				}
//			}
//			if (ch == '\0') { line = getNextLine(); ch = line[pos]; }
//			if (isInAlphabet(ch) || isspace(ch))  { break; }
//			reportWARNING("  ", " Scanner: \'" + holder + "\' Illegal Character. Ignoring"); pos++;
//			break;
//		} while(true);
/// try 2
		while (!infile.eof()) {
            if (line.empty() || pos > line.length()) {
                line = getNextLine(); pos = 0;
            }
            char ch = line[pos]; holder = ch;
            if ((ch == '.')) {
                if (isspace(line[pos + 1])) {
                    reportWARNING("  ", " Scanner: '.' Illegal Character. Ignoring");
                    pos++;
                }
            }
            if (ch == '\0') {
                line = getNextLine(); ch = line[pos];
            }
            if (isInAlphabet(ch) || isspace(ch)) {
                break;
            } else {
                reportWARNING("  ", std::string(" Scanner: ") + ch + std::string(" Illegal Character. Ignoring"));
                pos++;
                break;
            }
            //return EOFCHAR;
            //break;
		}
        return line[pos++];
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
leaq -0x20(%rbp), %rdi
callq 0x9480
leaq 0x30e6d(%rip), %rdi     # 0x453a8
movq 0x30e66(%rip), %rax     # 0x453a8
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x95e0
movb %al, -0x17a(%rbp)
jmp 0x14556
movb -0x17a(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x14567
jmp 0x149f9
leaq 0x30dfa(%rip), %rdi     # 0x45368
callq 0x9560
testb $0x1, %al
jne 0x1459f
movl 0x31033(%rip), %eax     # 0x455b0
movq %rax, -0x188(%rbp)
leaq 0x30ddd(%rip), %rdi     # 0x45368
callq 0x94e0
movq %rax, %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
jbe 0x145e0
leaq -0x50(%rbp), %rdi
callq 0x1a5c0
jmp 0x145aa
leaq 0x30db7(%rip), %rdi     # 0x45368
leaq -0x50(%rbp), %rsi
callq 0x9420
leaq -0x50(%rbp), %rdi
callq 0x9658
movl $0x0, 0x30fe3(%rip)     # 0x455b0
jmp 0x145e0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x14a47
movl 0x30fca(%rip), %eax     # 0x455b0
movl %eax, %esi
leaq 0x30d79(%rip), %rdi     # 0x45368
callq 0x9640
movq %rax, -0x190(%rbp)
jmp 0x145fd
movq -0x190(%rbp), %rax
movb (%rax), %al
movb %al, -0x51(%rbp)
movsbl -0x51(%rbp), %esi
leaq -0x20(%rbp), %rdi
callq 0x9550
jmp 0x14618
movsbl -0x51(%rbp), %eax
cmpl $0x2e, %eax
jne 0x1475a
movl 0x30f85(%rip), %eax     # 0x455b0
incl %eax
movl %eax, %esi
leaq 0x30d32(%rip), %rdi     # 0x45368
callq 0x9640
movq %rax, -0x198(%rbp)
jmp 0x14644
movq -0x198(%rbp), %rax
movsbl (%rax), %edi
callq 0x9080
cmpl $0x0, %eax
je 0x14758
leaq -0x79(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x95c0
movq -0x1a0(%rbp), %rdx
leaq 0x1ead8(%rip), %rsi     # 0x33152
leaq -0x78(%rbp), %rdi
callq 0x13550
jmp 0x14685
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x95c0
movq -0x1a8(%rbp), %rdx
leaq 0x1f1d1(%rip), %rsi     # 0x33877
leaq -0xa0(%rbp), %rdi
callq 0x13550
jmp 0x146b4
leaq -0x78(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1b2c0
jmp 0x146c6
leaq -0xa0(%rbp), %rdi
callq 0x9658
leaq -0xa1(%rbp), %rdi
callq 0x93b0
leaq -0x78(%rbp), %rdi
callq 0x9658
leaq -0x79(%rbp), %rdi
callq 0x93b0
movl 0x30eba(%rip), %eax     # 0x455b0
addl $0x1, %eax
movl %eax, 0x30eb1(%rip)     # 0x455b0
jmp 0x14758
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x1474a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x14735
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x9658
leaq -0xa1(%rbp), %rdi
callq 0x93b0
leaq -0x78(%rbp), %rdi
callq 0x9658
leaq -0x79(%rbp), %rdi
callq 0x93b0
jmp 0x14a47
jmp 0x1475a
movsbl -0x51(%rbp), %eax
cmpl $0x0, %eax
jne 0x147c7
leaq -0xc8(%rbp), %rdi
callq 0x1a5c0
jmp 0x14771
leaq 0x30bf0(%rip), %rdi     # 0x45368
movq %rdi, -0x1b8(%rbp)
leaq -0xc8(%rbp), %rsi
movq %rsi, -0x1c0(%rbp)
callq 0x9420
movq -0x1c0(%rbp), %rdi
callq 0x9658
movq -0x1b8(%rbp), %rdi
movl 0x30e05(%rip), %eax     # 0x455b0
movl %eax, %esi
callq 0x9640
movq %rax, -0x1b0(%rbp)
jmp 0x147bb
movq -0x1b0(%rbp), %rax
movb (%rax), %al
movb %al, -0x51(%rbp)
movsbl -0x51(%rbp), %edi
callq 0x1a9c0
movb %al, -0x1c1(%rbp)
jmp 0x147d8
movb -0x1c1(%rbp), %al
testb $0x1, %al
jne 0x147f2
jmp 0x147e4
movsbl -0x51(%rbp), %edi
callq 0x9080
cmpl $0x0, %eax
je 0x147f7
jmp 0x149f9
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x95c0
movq -0x1d0(%rbp), %rdx
leaq 0x1e93a(%rip), %rsi     # 0x33152
leaq -0xe8(%rbp), %rdi
callq 0x13550
jmp 0x14826
leaq -0x151(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x95c0
movq -0x1d8(%rbp), %rdx
leaq 0x1f05a(%rip), %rsi     # 0x338a1
leaq -0x150(%rbp), %rdi
callq 0x13550
jmp 0x14855
movsbl -0x51(%rbp), %edx
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x1ad20
jmp 0x1486e
leaq -0x179(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x95c0
movq -0x1e0(%rbp), %rdx
leaq 0x1eff5(%rip), %rsi     # 0x33884
leaq -0x178(%rbp), %rdi
callq 0x13550
jmp 0x1489d
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
leaq -0x178(%rbp), %rdx
callq 0xd410
jmp 0x148b9
leaq -0xe8(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x1b2c0
jmp 0x148ce
leaq -0x110(%rbp), %rdi
callq 0x9658
leaq -0x178(%rbp), %rdi
callq 0x9658
leaq -0x179(%rbp), %rdi
callq 0x93b0
leaq -0x130(%rbp), %rdi
callq 0x9658
leaq -0x150(%rbp), %rdi
callq 0x9658
leaq -0x151(%rbp), %rdi
callq 0x93b0
leaq -0xe8(%rbp), %rdi
callq 0x9658
leaq -0xe9(%rbp), %rdi
callq 0x93b0
movl 0x30c7c(%rip), %eax     # 0x455b0
addl $0x1, %eax
movl %eax, 0x30c73(%rip)     # 0x455b0
jmp 0x149f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x149eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x149d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x149c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x149af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0x149a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x9658
leaq -0x178(%rbp), %rdi
callq 0x9658
leaq -0x179(%rbp), %rdi
callq 0x93b0
leaq -0x130(%rbp), %rdi
callq 0x9658
leaq -0x150(%rbp), %rdi
callq 0x9658
leaq -0x151(%rbp), %rdi
callq 0x93b0
leaq -0xe8(%rbp), %rdi
callq 0x9658
leaq -0xe9(%rbp), %rdi
callq 0x93b0
jmp 0x14a47
movl 0x30bb1(%rip), %eax     # 0x455b0
movl %eax, %esi
movl %esi, %eax
incl %eax
movl %eax, 0x30ba5(%rip)     # 0x455b0
leaq 0x30956(%rip), %rdi     # 0x45368
callq 0x9640
movq %rax, -0x1e8(%rbp)
jmp 0x14a20
movq -0x1e8(%rbp), %rax
movb (%rax), %al
movb %al, -0x1e9(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x9658
movb -0x1e9(%rbp), %al
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x9658
movq -0x28(%rbp), %rdi
callq 0x95b0
nopl (%rax)