// File: Nallantli[P]Rossa/main/rossa/scope/scope.cpp
// Function: scope_t::getThis(token_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&)
const symbol_t scope_t::getThis(const token_t *token, trace_t &stack_trace)
{
	if (type != scope_type_enum::SCOPE_BOUNDED)
	{
		return symbol_t::Object(object_t(this, object_type_enum::OBJECT_STRONG));
	}
	if (parent != NULL)
	{
		return parent->getThis(token, stack_trace);
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x100(%rbp)
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
cmpl $0x0, (%rax)
je 0x8201b
movq -0xf0(%rbp), %rsi
movl $0x1, -0x34(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0x108(%rbp)
leaq -0x34(%rbp), %rdx
callq 0x7d3b0
movq -0x100(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x86c80
jmp 0x81ff3
leaq -0x30(%rbp), %rdi
callq 0x7d790
jmp 0x822da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x7d790
jmp 0x822ea
movq -0xf0(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x8204d
movq -0x100(%rbp), %rdi
movq -0xf0(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x81f80
jmp 0x822da
movb $0x1, -0xe4(%rbp)
movl $0xa8, %edi
callq 0x112b0
movq %rax, -0x118(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x119d0
movq -0x110(%rbp), %rdx
leaq 0xcfe99(%rip), %rsi     # 0x151f1f
leaq -0x88(%rbp), %rdi
callq 0x24740
jmp 0x82094
movb $0x1, -0xe2(%rbp)
leaq -0xd8(%rbp), %rax
movq %rax, -0x128(%rbp)
movq %rax, -0xe0(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x119d0
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rdx
leaq 0xce279(%rip), %rsi     # 0x150351
callq 0x24740
jmp 0x820df
movb $0x0, -0xe2(%rbp)
leaq -0xd8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x1, -0xb0(%rbp)
leaq -0xe3(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x26e30
movq -0x130(%rbp), %rcx
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x2d6a0
jmp 0x82135
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x9e250
jmp 0x8214e
movq -0x118(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x68(%rbp), %rsi
callq 0x9c360
jmp 0x82168
movq -0x118(%rbp), %rdi
movb $0x0, -0xe4(%rbp)
leaq 0x15eb03(%rip), %rsi    # 0x1e0c80
leaq -0x277e4(%rip), %rdx    # 0x5a9a0
callq 0x11970
jmp 0x822f3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x822b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x82245
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x821ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x821e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x11360
leaq -0xa8(%rbp), %rdi
callq 0x25b00
leaq -0xe3(%rbp), %rdi
callq 0x279c0
leaq -0xd8(%rbp), %rax
movq %rax, -0x140(%rbp)
addq $0x20, %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x148(%rbp)
callq 0x11360
movq -0x140(%rbp), %rcx
movq -0x148(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x138(%rbp)
jne 0x82212
jmp 0x82245
leaq -0xe1(%rbp), %rdi
callq 0x11600
testb $0x1, -0xe2(%rbp)
jne 0x8225c
jmp 0x822a9
movq -0xe0(%rbp), %rax
leaq -0xd8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x150(%rbp)
je 0x822a7
movq -0x150(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x158(%rbp)
callq 0x11360
movq -0x158(%rbp), %rax
leaq -0xd8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x150(%rbp)
jne 0x82276
jmp 0x822a9
leaq -0x88(%rbp), %rdi
callq 0x11360
leaq -0x89(%rbp), %rdi
callq 0x11600
testb $0x1, -0xe4(%rbp)
jne 0x822cc
jmp 0x822d8
movq -0x118(%rbp), %rdi
callq 0x11420
jmp 0x822ea
movq -0xf8(%rbp), %rax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)