// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/symbol/symbol.cpp
// Function: symbol_t::toString[abi:cxx11](token_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const std::string symbol_t::toString(const token_t *token, trace_t &stack_trace) const
{
	switch (d->type)
	{
	case value_type_enum::NIL:
		return KEYWORD_NIL;
	case value_type_enum::NUMBER:
		return std::get<number_t>(d->value).toString();
	case value_type_enum::STRING:
		return std::get<std::string>(d->value);
	case value_type_enum::FUNCTION:
	{
		std::string ret = "[";
		size_t i = 0;
		for (auto &e : std::get<wrapper_t>(d->value).map)
		{
			for (auto &t : e.second)
			{
				if (i++ > 0)
				{
					ret += ", ";
				}
				ret += "Function<" + t.first.toString() + ">";
			}
		}
		if (std::get<wrapper_t>(d->value).varg != nullptr)
		{
			if (i > 0)
			{
				ret += ", ";
			}
			ret += "Function<...>";
		}
		return ret + "]";
	}
	case value_type_enum::OBJECT:
	{
		if (std::get<object_t>(d->value).hasValue(ROSSA_HASH("->String")))
		{
			return std::get<object_t>(d->value).getVariable(ROSSA_HASH("->String"), token, stack_trace).call({}, token, stack_trace).getString(token, stack_trace);
		}
		std::stringstream ss;
		ss << "Object<" << std::get<object_t>(d->value).getKey() << ">";
		return ss.str();
	}
	case value_type_enum::POINTER:
	{
		std::stringstream ss;
		ss << "Pointer<" << std::addressof(std::get<std::shared_ptr<void>>(d->value)) << ">";
		return ss.str();
	}
	case value_type_enum::BOOLEAN_D:
		return std::get<bool>(d->value) ? KEYWORD_TRUE : KEYWORD_FALSE;
	case value_type_enum::ARRAY:
	{
		std::string ret = "[";
		unsigned int i = 0;
		for (auto &d2 : std::get<std::vector<symbol_t>>(d->value))
		{
			if (i > 0)
			{
				ret += ", ";
			}
			ret += d2.toString(token, stack_trace);
			i++;
		}
		return ret + "]";
	}
	case value_type_enum::DICTIONARY:
	{
		std::string ret = "{";
		unsigned int i = 0;
		for (auto &e : getDictionary(token, stack_trace))
		{
			if (i > 0)
			{
				ret += ", ";
			}
			ret += "\"" + e.first + "\" : " + e.second.toString(token, stack_trace);
			i++;
		}
		return ret + "}";
	}
	case value_type_enum::TYPE_NAME:
		return "Type<" + std::get<parameter_t>(d->value).toString() + ">";
	default:
		return "undefined";
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %r14
movq (%rsi), %rdi
movl (%rdi), %eax
addl $0xa, %eax
cmpl $0x9, %eax
ja 0x3a80d
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
leaq 0x3d2f1(%rip), %rcx     # 0x7764c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x90(%rsp), %rdi
callq 0x102c0
leaq 0xa0(%rsp), %rdi
leaq 0x3d508(%rip), %rsi     # 0x77888
callq 0x103b0
movq %rax, %rbx
movq (%r13), %rdi
addq $0x8, %rdi
callq 0x3bc9b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10300
leaq 0x3bfc7(%rip), %rsi     # 0x7636e
movq %rax, %rdi
callq 0x103b0
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
callq 0x10600
jmp 0x3a965
leaq 0x3beaf(%rip), %rsi     # 0x7627a
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c814
movq %r14, 0x8(%rsp)
movq %r13, 0x38(%rsp)
movq (%r13), %rdi
addq $0x8, %rdi
callq 0x3bd79
movq 0x18(%rax), %rcx
addq $0x8, %rax
xorl %r12d, %r12d
leaq 0x70(%rsp), %r13
leaq 0x50(%rsp), %rbx
leaq 0x10(%rsp), %r14
movq %rax, 0x40(%rsp)
cmpq %rax, %rcx
je 0x3a87e
movq 0x40(%rcx), %rbp
movq %rcx, 0x48(%rsp)
leaq 0x30(%rcx), %r15
cmpq %r15, %rbp
je 0x3a4b6
testq %r12, %r12
je 0x3a44b
leaq 0x90(%rsp), %rdi
leaq 0x3d1d4(%rip), %rsi     # 0x7761a
callq 0x10760
leaq 0x20(%rbp), %rsi
movq %r13, %rdi
callq 0x385da
movq %rbx, %rdi
leaq 0x3d3fe(%rip), %rsi     # 0x7785f
movq %r13, %rdx
callq 0x1cb73
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x3bef8(%rip), %rdx     # 0x7636e
callq 0x1ca7d
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x10790
movq %r14, %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x101d0
movq %r13, %rdi
callq 0x101d0
movq %rbp, %rdi
callq 0x102b0
movq %rax, %rbp
incq %r12
jmp 0x3a429
movq 0x48(%rsp), %rdi
callq 0x102b0
movq %rax, %rcx
movq 0x40(%rsp), %rax
jmp 0x3a413
leaq 0x3d3fb(%rip), %rsi     # 0x778cf
jmp 0x3a814
addq $0x8, %rdi
callq 0x3bd3f
movq %rax, %rbx
leaq 0x3d38b(%rip), %rsi     # 0x77877
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1c814
leaq 0x7c403(%rip), %rdi     # 0xb6908
leaq 0x90(%rsp), %rsi
callq 0x1efb0
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x366b2
movl %eax, %ebx
leaq 0x90(%rsp), %rdi
callq 0x101d0
testb %bl, %bl
je 0x3a8f1
movq (%r13), %rdi
addq $0x8, %rdi
callq 0x3bd3f
movq %rax, %rbx
leaq 0x3d327(%rip), %rsi     # 0x77877
leaq 0x90(%rsp), %rdi
leaq 0x218(%rsp), %rdx
callq 0x1c814
leaq 0x7c39c(%rip), %rdi     # 0xb6908
leaq 0x90(%rsp), %rsi
callq 0x1efb0
leaq 0x70(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x366ec
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
movq %r12, %rcx
movq %r15, %r8
callq 0x3aa8c
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x39aa6
leaq 0x50(%rsp), %rdi
callq 0x39102
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
jmp 0x3a8df
leaq 0x3c470(%rip), %rsi     # 0x76a55
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c814
movq %r14, 0x8(%rsp)
movq %r13, %rdi
movq %r12, 0x38(%rsp)
movq %r12, %rsi
movq %r15, 0x40(%rsp)
movq %r15, %rdx
callq 0x397e6
movq 0x18(%rax), %rbx
addq $0x8, %rax
movq %rax, 0x48(%rsp)
xorl %r12d, %r12d
leaq 0x70(%rsp), %rbp
leaq 0x50(%rsp), %r13
leaq 0x218(%rsp), %r14
leaq 0x10(%rsp), %r15
cmpq 0x48(%rsp), %rbx
je 0x3a860
subl $0x1, %r12d
jb 0x3a660
leaq 0x90(%rsp), %rdi
leaq 0x3cfbf(%rip), %rsi     # 0x7761a
callq 0x10760
leaq 0x20(%rbx), %rdx
movq %rbp, %rdi
leaq 0x3d274(%rip), %rsi     # 0x778e2
callq 0x1cb73
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x3d211(%rip), %rdx     # 0x77891
callq 0x1ca7d
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
callq 0x3a326
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x21f79
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x10790
movq %r15, %rdi
callq 0x101d0
movq %r14, %rdi
callq 0x101d0
movq %r13, %rdi
callq 0x101d0
movq %rbp, %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x102b0
movq %rax, %rbx
jmp 0x3a63b
addq $0x8, %rdi
callq 0x3bd22
leaq 0x3b992(%rip), %rcx     # 0x7608b
leaq 0x3badc(%rip), %rsi     # 0x761dc
cmpb $0x0, (%rax)
cmovneq %rcx, %rsi
jmp 0x3a814
addq $0x8, %rdi
callq 0x3bd5c
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x36f0a
leaq 0x3d16a(%rip), %rsi     # 0x77896
leaq 0x90(%rsp), %rdi
movq %rbx, %rdx
callq 0x1cb73
leaq 0x3bc2b(%rip), %rdx     # 0x7636e
leaq 0x90(%rsp), %rsi
movq %r14, %rdi
callq 0x1ca7d
leaq 0x90(%rsp), %rdi
callq 0x101d0
leaq 0x10(%rsp), %rdi
jmp 0x3a8e7
leaq 0x3bb09(%rip), %rsi     # 0x7627a
leaq 0x90(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1c814
movq %r14, 0x8(%rsp)
movq (%r13), %rdi
addq $0x8, %rdi
callq 0x3bce8
movq (%rax), %rbx
movq 0x8(%rax), %r13
xorl %ebp, %ebp
leaq 0x10(%rsp), %r14
cmpq %r13, %rbx
je 0x3a842
subl $0x1, %ebp
jb 0x3a7c5
leaq 0x90(%rsp), %rdi
leaq 0x3ce5a(%rip), %rsi     # 0x7761a
callq 0x10760
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x3a326
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
callq 0x10790
movq %r14, %rdi
callq 0x101d0
addq $0x10, %rbx
jmp 0x3a7a3
addq $0x8, %rdi
callq 0x3bd05
movq %r14, %rdi
movq %rax, %rsi
callq 0x10550
jmp 0x3a972
leaq 0x3d088(%rip), %rsi     # 0x7789c
leaq 0x90(%rsp), %rdx
movq %r14, %rdi
callq 0x1c814
jmp 0x3a972
addq $0x8, %rdi
callq 0x3bc13
movq %r14, %rdi
movq %rax, %rsi
callq 0x3f404
jmp 0x3a972
leaq 0x3b7d8(%rip), %rdx     # 0x76021
leaq 0x90(%rsp), %rsi
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1cb3b
jmp 0x3a8df
leaq 0x4005a(%rip), %rdx     # 0x7a8c1
leaq 0x90(%rsp), %rsi
movq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x1cb3b
jmp 0x3a8df
movq 0x38(%rsp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
callq 0x3bd79
movq 0x8(%rsp), %r14
cmpq $0x0, 0x30(%rax)
je 0x3a8c8
testq %r12, %r12
je 0x3a8b4
leaq 0x3cd73(%rip), %rsi     # 0x7761a
leaq 0x90(%rsp), %rdi
callq 0x10760
leaq 0x3cfae(%rip), %rsi     # 0x77869
leaq 0x90(%rsp), %rdi
callq 0x10760
leaq 0x3b752(%rip), %rdx     # 0x76021
leaq 0x90(%rsp), %rsi
movq %r14, %rdi
callq 0x1cb3b
leaq 0x90(%rsp), %rdi
callq 0x101d0
jmp 0x3a972
leaq 0x90(%rsp), %rdi
callq 0x102c0
leaq 0xa0(%rsp), %rdi
leaq 0x3cf73(%rip), %rsi     # 0x77880
callq 0x103b0
movq %rax, %rbx
movq (%r13), %rdi
addq $0x8, %rdi
callq 0x3bd3f
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x365e4
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x10370
leaq 0x3ba2b(%rip), %rsi     # 0x7636e
movq %rax, %rdi
callq 0x103b0
leaq 0x10(%rsp), %rdi
callq 0x101d0
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
callq 0x10600
leaq 0x90(%rsp), %rdi
callq 0x102f0
movq %r14, %rax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x39102
jmp 0x3a999
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
jmp 0x3aa76
jmp 0x3a9f4
jmp 0x3aa46
jmp 0x3aa46
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x3aa03
jmp 0x3aa00
jmp 0x3aa00
jmp 0x3aa46
jmp 0x3aa46
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x101d0
jmp 0x3a9e6
jmp 0x3aa46
jmp 0x3aa46
jmp 0x3a9f4
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x3aa7e
jmp 0x3a9f4
jmp 0x3a9f4
movq %rax, %rbx
jmp 0x3aa83
jmp 0x3aa46
jmp 0x3aa46
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x102f0
jmp 0x3aa83
jmp 0x3aa46
jmp 0x3aa46
jmp 0x3aa4b
jmp 0x3aa50
movq %rax, %rbx
jmp 0x3aa2c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
leaq 0x218(%rsp), %rdi
jmp 0x3aa5d
jmp 0x3aa46
jmp 0x3aa46
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x3aa71
jmp 0x3aa46
movq %rax, %rbx
jmp 0x3aa76
movq %rax, %rbx
jmp 0x3aa6c
movq %rax, %rbx
jmp 0x3aa62
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
leaq 0x50(%rsp), %rdi
callq 0x101d0
leaq 0x70(%rsp), %rdi
callq 0x101d0
leaq 0x90(%rsp), %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x106f0
nop