// File: 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
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x190(%rbp)
movq %rdi, %rax
movq %rax, -0x188(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x127e70
addl $0xa, %eax
movl %eax, %ecx
movq %rcx, -0x180(%rbp)
subl $0x9, %eax
ja 0xc9913
movq -0x180(%rbp), %rax
leaq 0x89d8c(%rip), %rcx     # 0x15320c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x190(%rbp), %rdi
callq 0x86580
jmp 0xc991f
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movq %rdi, -0x198(%rbp)
callq 0x127e80
movq -0x198(%rbp), %rdi
callq 0xca450
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0x86c20
jmp 0xc94cb
leaq -0x20(%rbp), %rdi
callq 0x8e610
jmp 0xc991f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x8e610
jmp 0xc992f
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x127e80
movq -0x1a0(%rbp), %rdi
callq 0xca450
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0x86bf0
jmp 0xc9524
leaq -0x40(%rbp), %rdi
callq 0x8e610
jmp 0xc991f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8e610
jmp 0xc992f
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x127e80
movq -0x1a8(%rbp), %rdi
callq 0xca450
movq -0x190(%rbp), %rdi
movq %rax, %rsi
callq 0x86d20
jmp 0xc957d
leaq -0x50(%rbp), %rdi
callq 0x8e610
jmp 0xc991f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x8e610
jmp 0xc992f
movq -0x10(%rbp), %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x127e80
movq -0x1b8(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0xca470
movq -0x190(%rbp), %rdi
movq -0x1b0(%rbp), %rsi
callq 0x86b90
jmp 0xc95e5
leaq -0x60(%rbp), %rdi
callq 0x8e610
leaq -0x70(%rbp), %rdi
callq 0x8e610
jmp 0xc991f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x8e610
leaq -0x70(%rbp), %rdi
callq 0x8e610
jmp 0xc992f
leaq -0x88(%rbp), %rdi
callq 0x2cc30
movq -0x10(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x127e80
jmp 0xc963d
leaq -0xa0(%rbp), %rdi
callq 0xca450
movq %rax, -0x1c0(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x8e610
movq -0x1c0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0xca4c0
movq %rax, -0xa8(%rbp)
movq -0x90(%rbp), %rdi
callq 0xca4f0
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0xca520
testb $0x1, %al
jne 0xc96a9
jmp 0xc9728
leaq -0xa8(%rbp), %rdi
callq 0xca560
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0xc9430
jmp 0xc96d1
leaq -0x88(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2cc50
jmp 0xc96e6
leaq -0xc8(%rbp), %rdi
callq 0x86dc0
leaq -0xa8(%rbp), %rdi
callq 0xca580
jmp 0xc9690
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc974e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x86dc0
jmp 0xc974e
movq -0x190(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x86c50
jmp 0xc973d
leaq -0x88(%rbp), %rdi
callq 0x2cf10
jmp 0xc991f
leaq -0x88(%rbp), %rdi
callq 0x2cf10
jmp 0xc992f
leaq -0xf8(%rbp), %rdi
callq 0x8c490
movq -0x10(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x127e80
jmp 0xc977d
leaq -0x110(%rbp), %rdi
callq 0xca450
movq %rax, -0x1c8(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x8e610
movq -0x1c8(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
callq 0xca5a0
movq %rax, -0x118(%rbp)
movq -0x100(%rbp), %rdi
callq 0xca5d0
movq %rax, -0x120(%rbp)
leaq -0x118(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0xca600
testb $0x1, %al
jne 0xc97ec
jmp 0xc98e2
leaq -0x118(%rbp), %rdi
callq 0xca630
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rsi
movq %rsi, -0x1d0(%rbp)
addq $0x20, %rsi
leaq -0x168(%rbp), %rdi
callq 0xc9430
jmp 0xc981f
movq -0x1d0(%rbp), %rsi
leaq -0x158(%rbp), %rdi
leaq -0x168(%rbp), %rdx
callq 0xca650
jmp 0xc983b
leaq -0xf8(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x8c550
movb %dl, -0x1d9(%rbp)
movq %rax, -0x1d8(%rbp)
jmp 0xc985d
movb -0x1d9(%rbp), %al
movq -0x1d8(%rbp), %rcx
movq %rcx, -0x178(%rbp)
movb %al, -0x170(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x8c5f0
leaq -0x168(%rbp), %rdi
callq 0x86dc0
leaq -0x118(%rbp), %rdi
callq 0xca6b0
jmp 0xc97d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc9905
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xc98d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x8c5f0
leaq -0x168(%rbp), %rdi
callq 0x86dc0
jmp 0xc9905
movq -0x190(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x86d50
jmp 0xc98f7
leaq -0xf8(%rbp), %rdi
callq 0x8c530
jmp 0xc991f
leaq -0xf8(%rbp), %rdi
callq 0x8c530
jmp 0xc992f
movq -0x190(%rbp), %rdi
callq 0x86580
movq -0x188(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x119c0
nopl (%rax,%rax)