// File: AndrewAlbert[P]Compiler-Theory/SourceCode/scopeTracker.cpp
// Function: scopeTracker::checkSymbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, scopeValue&, bool&)
bool scopeTracker::checkSymbol(string identifier, scopeValue &value, bool &global){
	// Ensure there is actuall a scope to check
	if(curPtr == nullptr) return false;
	
	// Check local symbols of current scope
	bool found = curPtr->checkSymbol(identifier, false);
	if(found){
		global = false;
		value = curPtr->getSymbol(identifier);
		return true;
	}
	else{
		found = outermost->checkSymbol(identifier, true);
		if(found){
			global = true;
			value = outermost->getSymbol(identifier);
			return true; 
		}
		else return false;
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, -0x160(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x158(%rbp)
cmpq $0x0, (%rax)
jne 0x1875c
movb $0x0, -0x1(%rbp)
jmp 0x18997
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x178(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x3130
movq -0x178(%rbp), %rdi
movq -0x170(%rbp), %rsi
xorl %edx, %edx
callq 0x15990
movb %al, -0x161(%rbp)
jmp 0x187a1
leaq -0x50(%rbp), %rdi
callq 0x31a0
movb -0x161(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
je 0x18875
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rcx)
movq (%rax), %rax
movq %rax, -0x188(%rbp)
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x3130
movq -0x188(%rbp), %rsi
movq -0x180(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x15a60
jmp 0x1880d
movq -0x20(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x18a40
leaq -0xa8(%rbp), %rdi
callq 0x12800
leaq -0xc8(%rbp), %rdi
callq 0x31a0
movb $0x1, -0x1(%rbp)
jmp 0x18997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x31a0
jmp 0x189a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x31a0
jmp 0x189a5
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1a0(%rbp)
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x3130
movq -0x1a0(%rbp), %rdi
movq -0x198(%rbp), %rsi
movl $0x1, %edx
callq 0x15990
movb %al, -0x189(%rbp)
jmp 0x188c1
movb -0x189(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x31a0
testb $0x1, -0x29(%rbp)
je 0x18993
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x1, (%rcx)
movq 0x10(%rax), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x150(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x3130
movq -0x1b0(%rbp), %rsi
movq -0x1a8(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x15a60
jmp 0x18931
movq -0x20(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x18a40
leaq -0x130(%rbp), %rdi
callq 0x12800
leaq -0x150(%rbp), %rdi
callq 0x31a0
movb $0x1, -0x1(%rbp)
jmp 0x18997
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x31a0
jmp 0x189a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x31a0
jmp 0x189a5
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3420
nop