// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/global/global.cpp
// Function: global::convertToSymbol(mediator_t const&)
const symbol_t global::convertToSymbol(const mediator_t &m)
{
	switch (m.getType())
	{
	case MEDIATOR_NIL:
		return symbol_t();
	case MEDIATOR_BOOLEAN_D:
		return symbol_t::Boolean(COERCE_BOOLEAN(m));
	case MEDIATOR_NUMBER:
		return symbol_t::Number(COERCE_NUMBER(m));
	case MEDIATOR_STRING:
		return symbol_t::String(COERCE_STRING(m));
	case MEDIATOR_POINTER:
		return symbol_t::Pointer(COERCE_POINTER(m, void));
	case MEDIATOR_ARRAY:
	{
		std::vector<symbol_t> sv;
		for (auto &e : COERCE_ARRAY(m))
		{
			sv.push_back(convertToSymbol(e));
		}
		return symbol_t::Array(sv);
	}
	case DICTIONARY:
	{
		std::map<const std::string, const symbol_t> sd;
		for (auto &e : COERCE_DICTIONARY(m))
		{
			sd.insert({e.first, convertToSymbol(e.second)});
		}
		return symbol_t::Dictionary(sd);
	}
	default:
		return symbol_t();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x6464c
addl $0xa, %eax
cmpl $0x9, %eax
ja 0x4cab5
leaq 0x2bd7c(%rip), %rcx     # 0x78828
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x38d00
jmp 0x4cc54
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x64650
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x3908e
jmp 0x4cc4a
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x64650
movq %rsp, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4cfa6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x39064
leaq 0x8(%rsp), %rdi
callq 0x1d786
leaq 0x40(%rsp), %rdi
jmp 0x4cc4f
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x64650
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x39080
jmp 0x4cc4a
leaq 0x8(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x64650
leaq 0x40(%rsp), %rdi
movq -0x8(%rdi), %rbp
callq 0x1d786
movq 0x18(%rbp), %r15
addq $0x8, %rbp
leaq 0x68(%rsp), %r14
leaq 0x38(%rsp), %r12
movq %rsp, %r13
cmpq %rbp, %r15
je 0x4cc7b
leaq 0x40(%r15), %rsi
movq %r14, %rdi
callq 0x4ca81
leaq 0x20(%r15), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x4cfc2
movq %r13, %rdi
movq %r12, %rsi
callq 0x3dfc6
movq %r12, %rdi
callq 0x3bbaa
movq %r14, %rdi
callq 0x39102
movq %r15, %rdi
callq 0x102b0
movq %rax, %r15
jmp 0x4cb85
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
callq 0x64650
leaq 0x40(%rsp), %rdi
movq -0x8(%rdi), %r15
callq 0x1d786
movq (%r15), %r14
movq 0x8(%r15), %r13
leaq 0x38(%rsp), %r15
movq %rsp, %r12
cmpq %r13, %r14
je 0x4cc66
movq %r15, %rdi
movq %r14, %rsi
callq 0x4ca81
movq %r12, %rdi
movq %r15, %rsi
callq 0x1f00a
movq %r15, %rdi
callq 0x39102
addq $0x18, %r14
jmp 0x4cc08
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x64650
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x390d4
leaq 0x8(%rsp), %rdi
callq 0x1d786
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3909c
movq %rsp, %rdi
callq 0x1f0b8
jmp 0x4cc54
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x390e2
movq %rsp, %rdi
callq 0x3bdb2
jmp 0x4cc54
jmp 0x4ccbf
jmp 0x4ccea
jmp 0x4ccb0
jmp 0x4ccea
jmp 0x4ccbf
jmp 0x4ccb0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1d786
leaq 0x40(%rsp), %rdi
jmp 0x4ccb8
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1d786
jmp 0x4cd04
movq %rax, %rbx
jmp 0x4cce0
movq %rax, %rbx
jmp 0x4ccd6
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3bbaa
leaq 0x68(%rsp), %rdi
callq 0x39102
movq %rsp, %rdi
callq 0x3bdb2
jmp 0x4cd04
movq %rax, %rbx
jmp 0x4ccfc
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x39102
movq %rsp, %rdi
callq 0x1f0b8
movq %rbx, %rdi
callq 0x106f0