// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseExternCallNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseExternCallNode(std::vector<node_scope_t> *scopes)
{
	nextToken();
	std::string libname = currentToken.valueString;
	nextToken();
	if (currentToken.type != TOK_INNER)
		return logErrorN(util::format(_EXPECTED_ERROR_, {"."}), currentToken);
	nextToken();
	std::string fname = 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<ExternCallNode>(*scopes, libname, fname, args, marker);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r13
movq %rsi, %rdi
callq 0x22e24
leaq 0xb0(%rbx), %r14
leaq 0xd8(%rsp), %rdi
movq %r14, %rsi
callq 0x10550
movq %rbx, %rdi
callq 0x22e24
leaq 0x58(%rbx), %r15
cmpl $-0x27, 0xd0(%rbx)
jne 0x25c9e
movq %rbx, %rdi
callq 0x22e24
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x10550
leaq 0xf8(%rsp), %rdi
movq %r15, %rsi
callq 0x1f71a
movq %rbx, %rdi
callq 0x22e24
cmpl $0x28, 0xd0(%rbx)
jne 0x25d17
movq %rbx, %rdi
callq 0x22e24
movq %r13, 0xb0(%rsp)
movq %r15, 0x38(%rsp)
xorps %xmm0, %xmm0
leaq 0x80(%rsp), %rbp
movaps %xmm0, (%rbp)
andq $0x0, 0x10(%rbp)
movl 0xd0(%rbx), %eax
xorl %r15d, %r15d
leaq 0x48(%rsp), %r13
leaq 0x40(%rsp), %r14
cmpl $0x29, %eax
je 0x25b67
subl $0x1, %r15d
jb 0x25ac1
cmpl $0x2c, %eax
jne 0x25c2f
movq %rbx, %rdi
callq 0x22e24
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x25798
cmpq $0x0, 0x40(%rsp)
je 0x25c07
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2e880
movq %r13, %rdi
callq 0x1d786
movl 0xd0(%rbx), %eax
testl %eax, %eax
jne 0x25aa1
leaq 0x50da5(%rip), %rsi     # 0x768a4
leaq 0x40(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x5281c(%rip), %rsi     # 0x78331
leaq 0x60(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x3f724
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x38(%rsp), %rcx
callq 0x25932
movq %rbx, %rdi
callq 0x22e24
leaq 0x10(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
leaq 0x80(%rsp), %r8
leaq 0xf8(%rsp), %r9
movq %r12, %rsi
callq 0x2e948
movq 0xb0(%rsp), %rbx
leaq 0x18(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x1d786
leaq 0x80(%rsp), %rdi
callq 0x2e838
leaq 0xf8(%rsp), %rdi
callq 0x1df38
leaq 0xb8(%rsp), %rdi
callq 0x101d0
leaq 0xd8(%rsp), %rdi
callq 0x101d0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50ca5(%rip), %rsi     # 0x768b3
leaq 0x10(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x1c814
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x38(%rsp), %rcx
callq 0x25932
leaq 0x50c6e(%rip), %rsi     # 0x768a4
leaq 0x40(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x50eb8(%rip), %rsi     # 0x76b04
leaq 0x60(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x98(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x3f724
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x38(%rsp), %rcx
callq 0x25932
leaq 0x50bff(%rip), %rsi     # 0x768a4
leaq 0xb8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x1c814
leaq 0x506d8(%rip), %rsi     # 0x76396
leaq 0x10(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x1c814
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x98(%rsp), %rcx
callq 0x1f298
leaq 0xf8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x3f724
leaq 0xf8(%rsp), %rdx
movq %rbx, %rsi
movq %r15, %rcx
callq 0x25932
leaq 0x50b86(%rip), %rsi     # 0x768a4
leaq 0x40(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x1c814
leaq 0x50473(%rip), %rsi     # 0x761aa
leaq 0x60(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xd(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x3f724
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq %r15, %rcx
callq 0x25932
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x25d99
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x1cea0
jmp 0x25dcc
movq %rax, %rbx
leaq 0xf8(%rsp), %rdi
callq 0x101d0
jmp 0x25dbd
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1cea0
jmp 0x25ddb
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x101d0
jmp 0x25ded
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x25ea2
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x101d0
jmp 0x25e95
jmp 0x25e0a
jmp 0x25e37
jmp 0x25e3c
jmp 0x25e16
jmp 0x25e25
jmp 0x25e78
jmp 0x25e78
movq %rax, %rbx
jmp 0x25ea2
jmp 0x25e3c
jmp 0x25e43
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x25e28
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x1cea0
jmp 0x25e46
movq %rax, %rbx
jmp 0x25e95
movq %rax, %rbx
jmp 0x25eaf
jmp 0x25e54
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x101d0
jmp 0x25e57
jmp 0x25e78
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x101d0
jmp 0x25e88
jmp 0x25e78
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x25e80
jmp 0x25e7d
jmp 0x25e78
movq %rax, %rbx
jmp 0x25e88
movq %rax, %rbx
movq %r13, %rdi
callq 0x1d786
leaq 0x80(%rsp), %rdi
callq 0x2e838
leaq 0xf8(%rsp), %rdi
callq 0x1df38
leaq 0xb8(%rsp), %rdi
callq 0x101d0
leaq 0xd8(%rsp), %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x106f0