// File: menhits[P]phplus/src/Namespace.cpp
// Function: NamespaceData::getType(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, std::shared_ptr<TokenData>)
Type NamespaceData::getType(string name, bool throwSourceError, Token tokenForError)
{
	vector<AstNodeBase*> results;
	
	types.get(name, results);
	
	if (results.empty())
	{
		if (parent)
			return parent->getType(name, throwSourceError, tokenForError);
		else if (throwSourceError)
			throw PhplusError("'"+name+"' type tidak ditemukan", SOURCE_ERROR);
		else
			return nullptr;
	}
	else if (results.size()!=1)
	{
		throw PhplusError("namespace has multiple defenitions of the same type '"+name+"'", INTERNAL_ERROR);
	}
	else if (results[0]->getReturnType()->getType()!=TypeBase::METATYPE)
	{
		throw PhplusError("node returning non meta type stored in namespace type map for type '"+name+"'", INTERNAL_ERROR);
	}
	else
	{
		return results[0]->getReturnType()->getSubType();
	}
}

// Assembly:
subq $0x258, %rsp            # imm = 0x258
movq %r8, 0x58(%rsp)
movq %rdx, 0x78(%rsp)
movq %rdi, 0x60(%rsp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, 0x68(%rsp)
movq %rdi, 0x250(%rsp)
movq %rsi, 0x248(%rsp)
movq %rdx, 0x240(%rsp)
andb $0x1, %al
movb %al, 0x23f(%rsp)
movq %r8, 0x230(%rsp)
movq 0x248(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x218(%rsp), %rdi
callq 0x3ed60
movq 0x70(%rsp), %rax
movq 0x78(%rsp), %rsi
addq $0xf8, %rax
movq %rax, 0x80(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xb1a0
jmp 0x3c54a
movq 0x80(%rsp), %rdi
leaq 0x1f8(%rsp), %rsi
leaq 0x218(%rsp), %rdx
callq 0x39a90
jmp 0x3c569
leaq 0x1f8(%rsp), %rdi
callq 0xb6e8
leaq 0x218(%rsp), %rdi
callq 0x3ed70
testb $0x1, %al
jne 0x3c58c
jmp 0x3c808
movq 0x70(%rsp), %rdi
addq $0x30, %rdi
callq 0x1d730
testb $0x1, %al
jne 0x3c5a3
jmp 0x3c6ae
movq 0x70(%rsp), %rdi
addq $0x30, %rdi
callq 0x1a6a0
movq 0x78(%rsp), %rsi
movq %rax, 0x50(%rsp)
leaq 0x1c8(%rsp), %rdi
callq 0xb1a0
jmp 0x3c5ca
movq 0x58(%rsp), %rsi
movzbl 0x23f(%rsp), %eax
movl %eax, 0x44(%rsp)
leaq 0x1b8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x1bc90
movl 0x44(%rsp), %ecx
movq 0x60(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %r8
andl $0x1, %ecx
leaq 0x1c8(%rsp), %rdx
callq 0x3c4c0
jmp 0x3c612
leaq 0x1b8(%rsp), %rdi
callq 0xfc00
leaq 0x1c8(%rsp), %rdi
callq 0xb6e8
movl $0x1, 0x1b4(%rsp)
jmp 0x3cb75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x1f8(%rsp), %rdi
callq 0xb6e8
jmp 0x3cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x1b8(%rsp), %rdi
callq 0xfc00
leaq 0x1c8(%rsp), %rdi
callq 0xb6e8
jmp 0x3cb8f
testb $0x1, 0x23f(%rsp)
je 0x3c7ea
movb $0x1, 0x15f(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x78(%rsp), %rdx
movq %rax, 0x38(%rsp)
leaq 0x9a3bb(%rip), %rsi     # 0xd6a9a
leaq 0x170(%rsp), %rdi
callq 0xfab0
jmp 0x3c6ee
leaq 0x95baa(%rip), %rdx     # 0xd229f
leaq 0x190(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0xfa60
jmp 0x3c70c
xorl %eax, %eax
movl %eax, 0x2c(%rsp)
movl %eax, %esi
leaq 0x160(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xfbe0
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %edx
movq 0x30(%rsp), %rcx
leaq 0x190(%rsp), %rsi
callq 0x35600
jmp 0x3c743
movq 0x38(%rsp), %rdi
movb $0x0, 0x15f(%rsp)
leaq 0xd8e71(%rip), %rsi     # 0x1155c8
leaq -0x220ee(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0x3cba9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3c7cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3c7c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x160(%rsp), %rdi
callq 0xfc00
leaq 0x190(%rsp), %rdi
callq 0xb6e8
leaq 0x170(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0x15f(%rsp)
jne 0x3c7db
jmp 0x3c7e5
movq 0x38(%rsp), %rdi
callq 0xb2d0
jmp 0x3cb8f
movq 0x60(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1dcb0
movl $0x1, 0x1b4(%rsp)
jmp 0x3cb75
leaq 0x218(%rsp), %rdi
callq 0x3edc0
cmpq $0x1, %rax
je 0x3c94a
movb $0x1, 0x107(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x78(%rsp), %rdx
movq %rax, 0x20(%rsp)
leaq 0x95a74(%rip), %rsi     # 0xd22b6
leaq 0x118(%rsp), %rdi
callq 0xfab0
jmp 0x3c851
leaq 0x9a242(%rip), %rdx     # 0xd6a9a
leaq 0x138(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0xfa60
jmp 0x3c86f
xorl %eax, %eax
movl %eax, %esi
leaq 0x108(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xfbe0
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rcx
leaq 0x138(%rsp), %rsi
movl $0x3, %edx
callq 0x35600
jmp 0x3c8a3
movq 0x20(%rsp), %rdi
movb $0x0, 0x107(%rsp)
leaq 0xd8d11(%rip), %rsi     # 0x1155c8
leaq -0x2224e(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0x3cba9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3c92f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3c922
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x108(%rsp), %rdi
callq 0xfc00
leaq 0x138(%rsp), %rdi
callq 0xb6e8
leaq 0x118(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0x107(%rsp)
jne 0x3c93b
jmp 0x3c945
movq 0x20(%rsp), %rdi
callq 0xb2d0
jmp 0x3cb8f
xorl %eax, %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x3ede0
movq (%rax), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x1aec0
jmp 0x3c96d
leaq 0xf0(%rsp), %rdi
callq 0x1a660
movq %rax, %rdi
movq (%rdi), %rax
movq 0x40(%rax), %rax
callq *%rax
movl %eax, 0x14(%rsp)
jmp 0x3c98c
leaq 0xf0(%rsp), %rdi
callq 0x1a950
movl 0x14(%rsp), %eax
cmpl $0x9, %eax
je 0x3caf5
movb $0x1, 0x9f(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x78(%rsp), %rdx
movq %rax, 0x8(%rsp)
leaq 0x95923(%rip), %rsi     # 0xd22ec
leaq 0xb0(%rsp), %rdi
callq 0xfab0
jmp 0x3c9d8
leaq 0x9a0bb(%rip), %rdx     # 0xd6a9a
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0xfa60
jmp 0x3c9f6
xorl %eax, %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xfbe0
movq 0x8(%rsp), %rdi
movq (%rsp), %rcx
leaq 0xd0(%rsp), %rsi
movl $0x3, %edx
callq 0x35600
jmp 0x3ca28
movq 0x8(%rsp), %rdi
movb $0x0, 0x9f(%rsp)
leaq 0xd8b8c(%rip), %rsi     # 0x1155c8
leaq -0x223d3(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0x3cba9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x1a950
jmp 0x3cb8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3cada
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
jmp 0x3cacd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0xfc00
leaq 0xd0(%rsp), %rdi
callq 0xb6e8
leaq 0xb0(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0x9f(%rsp)
jne 0x3cae6
jmp 0x3caf0
movq 0x8(%rsp), %rdi
callq 0xb2d0
jmp 0x3cb8f
xorl %eax, %eax
movl %eax, %esi
leaq 0x218(%rsp), %rdi
callq 0x3ede0
movq (%rax), %rsi
leaq 0x88(%rsp), %rdi
callq 0x1aec0
jmp 0x3cb18
leaq 0x88(%rsp), %rdi
callq 0x1a660
movq 0x60(%rsp), %rdi
movq %rax, %rsi
movq (%rsi), %rax
movq 0x48(%rax), %rax
callq *%rax
jmp 0x3cb38
leaq 0x88(%rsp), %rdi
callq 0x1a950
movl $0x1, 0x1b4(%rsp)
jmp 0x3cb75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x1f0(%rsp)
movl %eax, 0x1ec(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x1a950
jmp 0x3cb8f
leaq 0x218(%rsp), %rdi
callq 0x3ee00
movq 0x68(%rsp), %rax
addq $0x258, %rsp            # imm = 0x258
retq
leaq 0x218(%rsp), %rdi
callq 0x3ee00
movq 0x1f0(%rsp), %rdi
callq 0xb680
nopl (%rax)