// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq (%rdi), %r13
testq %r13, %r13
je 0x10148
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
movq %rcx, (%rsp)
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %rbp
movq %rbp, %rdi
callq 0x3bac
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xeb08
movl %eax, %ebp
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0xff1a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
testb %bpl, %bpl
je 0x10008
movq (%rsp), %rax
movb $0x0, (%rax)
movq (%r12), %r15
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x3bac
leaq 0x88(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xeb2c
leaq 0x90(%rsp), %r14
movq -0x8(%r14), %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rax
movups (%r14), %xmm0
movq 0x10(%r14), %rcx
movq %rcx, 0x18(%rbx)
movups 0x8(%rbx), %xmm1
movups %xmm0, 0x8(%rbx)
leaq 0xd0(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0xdda4
leaq 0x20(%rbx), %rdi
leaq 0xa8(%rsp), %r15
movq %r15, %rsi
callq 0x2270
movq 0x20(%r15), %rax
movq %rax, 0x40(%rbx)
movq (%r15), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xffe8
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0xdda4
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x10144
movq 0x58(%rsp), %rsi
jmp 0x1013c
movq 0x10(%r12), %r13
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
callq 0x3bac
movq %r13, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0xeb08
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x10056
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
testb %bpl, %bpl
je 0x10148
movq (%rsp), %rax
movb $0x1, (%rax)
movq 0x10(%r12), %r15
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3bac
leaq 0x88(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xeb2c
leaq 0x90(%rsp), %r14
movq -0x8(%r14), %rax
movq %rax, (%rbx)
movq 0x18(%rbx), %rax
movups (%r14), %xmm0
movq 0x10(%r14), %rcx
movq %rcx, 0x18(%rbx)
movups 0x8(%rbx), %xmm1
movups %xmm0, 0x8(%rbx)
leaq 0xd0(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0xdda4
leaq 0x20(%rbx), %rdi
leaq 0xa8(%rsp), %r15
movq %r15, %rsi
callq 0x2270
movq 0x20(%r15), %rax
movq %rax, 0x40(%rbx)
movq (%r15), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x10125
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r14, %rdi
callq 0xdda4
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x10144
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movb $0x1, %al
jmp 0x1014a
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x101b2
movq 0x18(%rsp), %rsi
jmp 0x101aa
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x101b2
movq 0x38(%rsp), %rsi
jmp 0x101aa
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x101b2
movq 0x58(%rsp), %rsi
jmp 0x101aa
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x101b2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2330