// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0xa0(%rsp), %rdi
movq %rdx, %rsi
callq 0xa3b0
leaq 0xf8(%r12), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x1b2fe
leaq 0xa0(%rsp), %rdi
callq 0xa558
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq %rcx, %rax
je 0x1cd79
subq %rax, %rcx
cmpq $0x8, %rcx
jne 0x1ce02
movq (%rax), %rsi
movq %rsp, %rdi
callq 0x11a44
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movl %eax, %ebp
leaq 0x8(%rsp), %rdi
callq 0xc984
cmpl $0x9, %ebp
jne 0x1ce74
movq 0x20(%rsp), %rax
movq (%rax), %rsi
movq %rsp, %rdi
callq 0x11a44
movq (%rsp), %rsi
movq (%rsi), %rax
movq %rbx, %rdi
callq *0x48(%rax)
leaq 0x8(%rsp), %rdi
callq 0xc984
jmp 0x1cde5
movq 0x30(%r12), %r12
testq %r12, %r12
je 0x1cdd6
leaq 0x80(%rsp), %rdi
movq %r14, %rsi
callq 0xa3b0
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x12e2e
movzbl %bpl, %ecx
leaq 0x80(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %r8
callq 0x1cca8
leaq 0x48(%rsp), %rdi
callq 0xc984
leaq 0x80(%rsp), %rdi
callq 0xa558
jmp 0x1cde5
testb %bpl, %bpl
jne 0x1cee3
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x1ebda
movq %rbx, %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x38
popq %rdi
callq 0xa1b0
movq %rax, %r15
leaq 0x384a2(%rip), %rsi     # 0x552b6
movq %rsp, %rdi
movq %r14, %rdx
callq 0xc8a1
leaq 0x3c42c(%rip), %rdx     # 0x59252
leaq 0xe0(%rsp), %rdi
movq %rsp, %rsi
callq 0xc882
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0xe0(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x19f06
xorl %ebp, %ebp
leaq 0x5a738(%rip), %rsi     # 0x77598
leaq -0xb7d5(%rip), %rdx     # 0x11692
movq %r15, %rdi
callq 0xa4e0
jmp 0x1cf4f
pushq $0x38
popq %rdi
callq 0xa1b0
movq %rax, %r15
leaq 0x38466(%rip), %rsi     # 0x552ec
movq %rsp, %rdi
movq %r14, %rdx
callq 0xc8a1
leaq 0x3c3ba(%rip), %rdx     # 0x59252
leaq 0xc0(%rsp), %rdi
movq %rsp, %rsi
callq 0xc882
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0xc0(%rsp), %rsi
pushq $0x3
popq %rdx
movq %r15, %rdi
callq 0x19f06
xorl %ebp, %ebp
leaq 0x5a6c6(%rip), %rsi     # 0x77598
leaq -0xb847(%rip), %rdx     # 0x11692
movq %r15, %rdi
callq 0xa4e0
jmp 0x1cf4f
pushq $0x38
popq %rdi
callq 0xa1b0
movq %rax, %r15
leaq 0x3c35d(%rip), %rsi     # 0x59252
movq %rsp, %rdi
movq %r14, %rdx
callq 0xc8a1
leaq 0x38398(%rip), %rdx     # 0x5529f
leaq 0x100(%rsp), %rdi
movq %rsp, %rsi
callq 0xc882
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rcx
movaps %xmm0, (%rcx)
movb $0x1, %bpl
leaq 0x100(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x19f06
xorl %ebp, %ebp
leaq 0x5a658(%rip), %rsi     # 0x77598
leaq -0xb8b5(%rip), %rdx     # 0x11692
movq %r15, %rdi
callq 0xa4e0
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0xc984
leaq 0x100(%rsp), %rdi
jmp 0x1cf98
jmp 0x1cf9f
jmp 0x1cfcd
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0xc984
leaq 0xc0(%rsp), %rdi
jmp 0x1cf98
jmp 0x1cf9f
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xc984
leaq 0xe0(%rsp), %rdi
callq 0xa558
jmp 0x1cfa5
movq %rax, %rbx
movb $0x1, %bpl
movq %rsp, %rdi
callq 0xa558
testb %bpl, %bpl
jne 0x1cfd0
jmp 0x1d004
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xc984
leaq 0x80(%rsp), %rdi
jmp 0x1cffa
jmp 0x1cfcd
movq %rax, %rbx
movq %r15, %rdi
callq 0xa230
jmp 0x1d004
jmp 0x1cfde
jmp 0x1d001
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc984
jmp 0x1d004
jmp 0x1d001
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xa558
jmp 0x1d004
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1ebda
movq %rbx, %rdi
callq 0xa500