// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseParamTypeNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*, std::vector<long long, std::allocator<long long>> const&)
parameter_t node_parser_t::parseParamTypeNode(std::vector<node_scope_t> *scopes, const aug_type_t &base)
{
	parameter_t pt({}, base);
	nextToken();

	int i = 0;
	while (currentToken.valueString != ">")
	{
		if (i++ > 0)
		{
			if (currentToken.type != ',')
				return logErrorPT(util::format(_EXPECTED_ERROR_, {","}), currentToken);
			nextToken();
		}
		aug_type_t qbase = {value_type_enum::ANY};
		switch (currentToken.type)
		{
		case TOK_BOOLEAN:
			qbase = {value_type_enum::BOOLEAN_D};
			nextToken();
			break;
		case TOK_NUMBER:
			qbase = {value_type_enum::NUMBER};
			nextToken();
			break;
		case TOK_ARRAY:
			qbase = {value_type_enum::ARRAY};
			nextToken();
			break;
		case TOK_STRING:
			qbase = {value_type_enum::STRING};
			nextToken();
			break;
		case TOK_DICTIONARY:
			qbase = {value_type_enum::DICTIONARY};
			nextToken();
			break;
		case TOK_OBJECT:
			qbase = {value_type_enum::OBJECT};
			nextToken();
			break;
		case TOK_FUNCTION:
			qbase = {value_type_enum::FUNCTION};
			nextToken();
			break;
		case TOK_POINTER:
			qbase = {value_type_enum::POINTER};
			nextToken();
			break;
		case TOK_ANY:
			nextToken();
			break;
		case TOK_TYPE_NAME:
			qbase = {value_type_enum::TYPE_NAME};
			nextToken();
			break;
		case TOK_IDF:
		{
			qbase = {};
			while (currentToken.type == TOK_IDF)
			{
				qbase.push_back(ROSSA_HASH(currentToken.valueString));
				nextToken();
				if (currentToken.type != TOK_INNER)
					break;
				nextToken();
			}
			break;
		}
		default:
			return logErrorPT(_EXPECTED_BASE_TYPE_, currentToken);
		}
		if (currentToken.valueString == "<")
		{
			pt.addQualifier(parseParamTypeNode(scopes, qbase));
		}
		else
		{
			pt.addQualifier(parameter_t({}, qbase));
		}
	}
	nextToken();
	return pt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdx, 0x90(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0xd0(%rsp), %rdi
movq %rcx, %rdx
callq 0x36e60
movq %r14, 0x88(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x2e99e
movq %rbx, %rdi
callq 0x22e24
leaq 0xb0(%rbx), %r12
xorl %ebp, %ebp
leaq 0x98(%rsp), %r13
leaq 0x10(%rsp), %r14
leaq 0x60(%rsp), %r15
movq %r12, %rdi
leaq 0x50078(%rip), %rsi     # 0x7636e
callq 0x1f318
testb %al, %al
je 0x26550
testl %ebp, %ebp
je 0x2631c
cmpl $0x2c, 0xd0(%rbx)
jne 0x26590
movq %rbx, %rdi
callq 0x22e24
movq $-0xb, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x2e9c0
movl 0xd0(%rbx), %eax
leal 0x23(%rax), %ecx
cmpl $0xe, %ecx
ja 0x26372
leaq 0x50375(%rip), %rdx     # 0x766c0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq $-0x6, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
cmpl $-0x2e, %eax
je 0x264a1
cmpl $-0x2, %eax
jne 0x26604
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3152c
cmpl $-0x2, 0xd0(%rbx)
jne 0x264c2
leaq 0x90564(%rip), %rdi     # 0xb6908
movq %r12, %rsi
callq 0x1efb0
movq %rax, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x31648
movq %rbx, %rdi
callq 0x22e24
cmpl $-0x27, 0xd0(%rbx)
jne 0x264c2
movq %rbx, %rdi
callq 0x22e24
jmp 0x26390
movq $-0x7, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0x2, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0x8, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0x4, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0x3, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0x9, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0x5, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
jmp 0x264ba
movq $-0xa, 0x10(%rsp)
movq %r13, %rdi
movq %r14, %rsi
leaq 0x18(%rsp), %rdx
callq 0x3152c
movq %rbx, %rdi
callq 0x22e24
movq %r12, %rdi
leaq 0x4fed9(%rip), %rsi     # 0x763a5
callq 0x1c7a0
testb %al, %al
je 0x26505
movq %r14, %rdi
movq %rbx, %rsi
movq 0x90(%rsp), %rdx
movq %r13, %rcx
callq 0x26278
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
callq 0x36f00
movq %r14, %rdi
callq 0x2e9f6
jmp 0x26541
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
andq $0x0, 0x70(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x36e60
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
callq 0x36f00
movq %r14, %rdi
callq 0x2e9f6
movq %r15, %rdi
callq 0x2e99e
incl %ebp
movq %r13, %rdi
callq 0x2fa2a
jmp 0x262ec
movq %rbx, %rdi
callq 0x22e24
leaq 0xd0(%rsp), %rbx
movq 0x88(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2ea16
movq %rbx, %rdi
callq 0x2e9f6
movq %r14, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5030d(%rip), %rsi     # 0x768a4
leaq 0x98(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1c814
leaq 0x50554(%rip), %rsi     # 0x76b04
leaq 0x60(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0xb8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xd(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x3f724
leaq 0x58(%rbx), %rcx
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
callq 0x2670e
leaq 0x502c4(%rip), %rsi     # 0x768cf
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x1c814
leaq 0x58(%rbx), %rcx
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
callq 0x2670e
jmp 0x266df
jmp 0x266df
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2e99e
jmp 0x26705
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x26659
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x1cea0
jmp 0x2667c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x266eb
jmp 0x266e8
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x101d0
jmp 0x2669d
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
jmp 0x266e8
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x101d0
jmp 0x266f8
jmp 0x266df
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2e9f6
jmp 0x266eb
jmp 0x266e8
movq %rax, %rbx
jmp 0x266d1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2e9f6
leaq 0x60(%rsp), %rdi
callq 0x2e99e
jmp 0x266eb
jmp 0x266df
movq %rax, %rbx
jmp 0x266f8
jmp 0x266e8
jmp 0x266e8
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x2fa2a
leaq 0xd0(%rsp), %rdi
callq 0x2e9f6
movq %rbx, %rdi
callq 0x106f0
nop