// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseCallOpNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseCallOpNode(std::vector<node_scope_t> *scopes)
{
	nextToken();
	size_t id = std::stoll(currentToken.valueString);
	auto marker = currentToken;
	nextToken();

	if (currentToken.type != '(')
		return logErrorN(util::format(_EXPECTED_ERROR_, {"("}), currentToken);
	nextToken();

	std::vector<ptr_node_t> args;
	int i = 0;
	while (currentToken.type != ')')
	{
		if (i > 0)
		{
			if (currentToken.type != ',')
				return logErrorN(util::format(_EXPECTED_ERROR_, {","}), currentToken);
			nextToken();
		}
		i++;
		if (auto b = parseEquNode(scopes))
			args.push_back(b);
		else
			return logErrorN(_EXPECTED_FUNCTION_PARAM_, currentToken);
		if (currentToken.type == NULL_TOK)
			return logErrorN(util::format(_EXPECTED_ERROR_, {")"}), currentToken);
	}
	nextToken();
	return std::make_shared<CallOpNode>(*scopes, id, args, marker);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x22e24
leaq 0x58(%rbx), %r14
leaq 0xb0(%rbx), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x2e770
movq %rax, 0xb0(%rsp)
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x1f71a
movq %rbx, %rdi
callq 0x22e24
cmpl $0x28, 0xd0(%rbx)
jne 0x26136
movq %rbx, %rdi
callq 0x22e24
movq %r15, 0xa8(%rsp)
movq %r14, 0x8(%rsp)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rbp
movaps %xmm0, (%rbp)
andq $0x0, 0x10(%rbp)
movl 0xd0(%rbx), %eax
xorl %r15d, %r15d
leaq 0x38(%rsp), %r13
leaq 0x30(%rsp), %r14
cmpl $0x29, %eax
je 0x26027
subl $0x1, %r15d
jb 0x25f81
cmpl $0x2c, %eax
jne 0x260c7
movq %rbx, %rdi
callq 0x22e24
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x25798
cmpq $0x0, 0x30(%rsp)
je 0x2609f
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2e880
movq %r13, %rdi
callq 0x1d786
movl 0xd0(%rbx), %eax
testl %eax, %eax
jne 0x25f61
leaq 0x508e5(%rip), %rsi     # 0x768a4
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1c814
leaq 0x5235c(%rip), %rsi     # 0x78331
leaq 0x50(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x1c814
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x3f724
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x8(%rsp), %rcx
callq 0x25932
movq %rbx, %rdi
callq 0x22e24
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
leaq 0x70(%rsp), %rcx
leaq 0xb8(%rsp), %r8
movq %r12, %rsi
callq 0x2e976
movq 0xa8(%rsp), %rbx
leaq 0x18(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x1d786
leaq 0x70(%rsp), %rdi
callq 0x2e838
leaq 0xb8(%rsp), %rdi
callq 0x1df38
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5080d(%rip), %rsi     # 0x768b3
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1c814
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x8(%rsp), %rcx
callq 0x25932
leaq 0x507d6(%rip), %rsi     # 0x768a4
leaq 0x30(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1c814
leaq 0x50a20(%rip), %rsi     # 0x76b04
leaq 0x50(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x1c814
leaq 0x90(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x3f724
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x8(%rsp), %rcx
callq 0x25932
leaq 0x50767(%rip), %rsi     # 0x768a4
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x1c814
leaq 0x50054(%rip), %rsi     # 0x761aa
leaq 0x50(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1c814
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x5(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x3f724
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq %r14, %rcx
callq 0x25932
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x261b2
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x1cea0
jmp 0x261c1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x101d0
jmp 0x261d0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x101d0
jmp 0x26262
jmp 0x2620c
jmp 0x261eb
jmp 0x261fa
jmp 0x26248
jmp 0x26248
jmp 0x26213
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x261fd
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1cea0
jmp 0x26216
movq %rax, %rbx
jmp 0x26262
jmp 0x26224
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x101d0
jmp 0x26227
jmp 0x26248
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x101d0
jmp 0x26258
jmp 0x26248
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x26250
jmp 0x2624d
jmp 0x26248
movq %rax, %rbx
jmp 0x26258
movq %rax, %rbx
movq %r13, %rdi
callq 0x1d786
leaq 0x70(%rsp), %rdi
callq 0x2e838
leaq 0xb8(%rsp), %rdi
callq 0x1df38
movq %rbx, %rdi
callq 0x106f0
nop