// File: Nallantli[P]Rossa/main/rossa/scope/scope.cpp
// Function: scope_t::getVariable(unsigned long long const&, token_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t &scope_t::getVariable(const hash_ull &key, const token_t *token, trace_t &stack_trace) const
{
	const auto it = values.find(key);
	if (it != values.end())
	{
		return it->second;
	}
	if (parent != NULL)
	{
		return parent->getVariable(key, token, stack_trace);
	}

	throw rossa_error_t(util::format(_UNDECLARED_VARIABLE_ERROR_, {ROSSA_DEHASH(key)}), *token, stack_trace);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
callq 0x82500
movq -0xf0(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x18, %rdi
callq 0x384a0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x384d0
testb $0x1, %al
jne 0x81a1e
jmp 0x81a34
leaq -0x30(%rbp), %rdi
callq 0x82530
addq $0x8, %rax
movq %rax, -0x8(%rbp)
jmp 0x81cb8
movq -0xf0(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x81a67
movq -0xf0(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x819c0
movq %rax, -0x8(%rbp)
jmp 0x81cb8
movb $0x1, -0xe2(%rbp)
movl $0xa8, %edi
callq 0x112b0
movq %rax, -0x100(%rbp)
leaq -0x79(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x119d0
movq -0xf8(%rbp), %rdx
leaq 0xd0482(%rip), %rsi     # 0x151f1f
leaq -0x78(%rbp), %rdi
callq 0x24740
jmp 0x81aa8
leaq -0xd8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movq -0x18(%rbp), %rdx
leaq 0x163fd7(%rip), %rsi    # 0x1e5a98
callq 0x2d270
jmp 0x81ac8
leaq -0xd8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x1, -0xb0(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x26e30
movq -0x108(%rbp), %rcx
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x2d6a0
jmp 0x81b17
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x9e250
jmp 0x81b2d
movq -0x100(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x58(%rbp), %rsi
callq 0x9c360
jmp 0x81b47
movq -0x100(%rbp), %rdi
movb $0x0, -0xe2(%rbp)
leaq 0x15f124(%rip), %rsi    # 0x1e0c80
leaq -0x271c3(%rip), %rdx    # 0x5a9a0
callq 0x11970
jmp 0x81cd1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x81c96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
movq -0xe0(%rbp), %rax
leaq -0xd8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x110(%rbp)
je 0x81be1
movq -0x110(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x118(%rbp)
callq 0x11360
movq -0x118(%rbp), %rax
leaq -0xd8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x110(%rbp)
jne 0x81bb0
jmp 0x81c8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x81c35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
jmp 0x81c29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x88(%rbp)
movl %eax, -0x8c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x11360
leaq -0xa8(%rbp), %rdi
callq 0x25b00
leaq -0xe1(%rbp), %rdi
callq 0x279c0
leaq -0xd8(%rbp), %rax
movq %rax, -0x128(%rbp)
addq $0x20, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x130(%rbp)
callq 0x11360
movq -0x128(%rbp), %rcx
movq -0x130(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0x81c5a
jmp 0x81c8d
leaq -0x78(%rbp), %rdi
callq 0x11360
leaq -0x79(%rbp), %rdi
callq 0x11600
testb $0x1, -0xe2(%rbp)
jne 0x81caa
jmp 0x81cb6
movq -0x100(%rbp), %rdi
callq 0x11420
jmp 0x81cc5
movq -0x8(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)