// File: /workspace/github_cpp_makefile_star2_O1/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 $0x168, %rsp            # imm = 0x168
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x2565a
leaq 0xa8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xb0(%rbx), %rsi
movq 0xb8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x1e014
movq %rbx, %rdi
callq 0x2565a
leaq 0x58(%rbx), %rbp
cmpl $-0x27, 0xd0(%rbx)
jne 0x29d78
movq %rbx, %rdi
callq 0x2565a
leaq 0x60(%rsp), %r13
movq %r13, -0x10(%r13)
movq 0xb0(%rbx), %rsi
movq 0xb8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0x1e014
leaq 0xe8(%rsp), %rdi
movq %rbp, %rsi
callq 0x1e698
leaq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0x80(%rbx), %rsi
movq 0x88(%rbx), %rdx
addq %rsi, %rdx
callq 0x1e014
movups 0xa0(%rbx), %xmm0
leaq 0x140(%rsp), %rdi
movups %xmm0, -0x10(%rdi)
leaq 0x150(%rsp), %rax
movq %rax, -0x10(%rax)
movq 0xb0(%rbx), %rsi
movq 0xb8(%rbx), %rdx
addq %rsi, %rdx
callq 0x1e014
movl 0xd0(%rbx), %eax
movl %eax, 0x160(%rsp)
movq %rbx, %rdi
callq 0x2565a
cmpl $0x28, 0xd0(%rbx)
jne 0x29e06
movq %rbx, %rdi
callq 0x2565a
movq %rbp, 0x70(%rsp)
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rbp
movaps %xmm0, (%rbp)
movq $0x0, 0x10(%rbp)
xorl %r13d, %r13d
leaq 0x30(%rsp), %r14
movl 0xd0(%rbx), %eax
cmpl $0x29, %eax
je 0x29b9d
subl $0x1, %r13d
jb 0x29ad0
cmpl $0x2c, %eax
jne 0x29ce8
movq %rbx, %rdi
callq 0x2565a
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x296b0
cmpq $0x0, 0x30(%rsp)
je 0x29cb5
movq %rbp, %rdi
movq %r14, %rsi
callq 0x3725c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x29b04
callq 0x1e6ee
cmpl $0x0, 0xd0(%rbx)
jne 0x29aaa
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, (%r14)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x6(%r14)
movq $0xe, -0x8(%r14)
movb $0x0, 0xe(%r14)
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x29, (%r15)
movq $0x1, -0x8(%r15)
leaq 0xb8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x20c5e
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x48694
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x70(%rsp), %rcx
callq 0x29894
movq %rbx, %rdi
callq 0x2565a
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x98(%rsp), %r8
leaq 0x50(%rsp), %r9
movq %r12, %rcx
leaq 0xe8(%rsp), %rax
pushq %rax
pushq %rbp
leaq 0xb8(%rsp), %r14
leaq 0x70(%rsp), %r13
callq 0x38d2c
addq $0x10, %rsp
movq 0x10(%rsp), %rax
movq %rax, (%r15)
xorl %eax, %eax
movq %rax, 0x8(%r15)
movq 0x18(%rsp), %rcx
movq %rax, 0x18(%rsp)
movq %rcx, 0x8(%r15)
leaq 0xd0(%rsp), %rdi
callq 0x37214
movq 0x140(%rsp), %rdi
leaq 0x150(%rsp), %rax
cmpq %rax, %rdi
je 0x29c3a
movq 0x150(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x29c5f
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0xe8(%rsp), %rdi
callq 0x1d736
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x29c83
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x29ca0
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %r15, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x5abad(%rip), %rsi     # 0x84872
leaq 0x5abc1(%rip), %rdx     # 0x8488d
leaq 0x10(%rsp), %rdi
callq 0x1e7ca
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x70(%rsp), %rcx
callq 0x29894
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, (%r14)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x6(%r14)
movq $0xe, -0x8(%r14)
movb $0x0, 0xe(%r14)
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x2c, (%r15)
movq $0x1, -0x8(%r15)
leaq 0xb8(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x20c5e
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x48694
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq 0x70(%rsp), %rcx
callq 0x29894
movq %r14, %r12
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, (%r14)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x6(%r14)
movq $0xe, -0x8(%r14)
movb $0x0, 0xe(%r14)
leaq 0x20(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x2e, (%r15)
movq $0x1, -0x8(%r15)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x78(%rsp), %rcx
movl $0x1, %edx
callq 0x20c5e
leaq 0xe8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x48694
leaq 0xe8(%rsp), %rdx
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x29894
movq %r14, %r12
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, (%r14)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x6(%r14)
movq $0xe, -0x8(%r14)
movb $0x0, 0xe(%r14)
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movw $0x28, (%r15)
movq $0x1, -0x8(%r15)
leaq 0xd0(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0xb8(%rsp), %rcx
movl $0x1, %edx
callq 0x20c5e
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x48694
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x29894
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29ebd
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x29ebd
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x1dca2
jmp 0x29f04
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29ef5
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x29ef5
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1dca2
jmp 0x29f40
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x29f1e
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x29f35
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %r12, %r14
jmp 0x2a0bc
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r15, %rdi
je 0x29f57
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x29f6e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %r12, %r14
jmp 0x2a0e0
movq %rax, %rbx
jmp 0x2a0af
jmp 0x2a08b
movq %rax, %rbx
movq 0x110(%rsp), %rdi
leaq 0x120(%rsp), %rax
cmpq %rax, %rdi
je 0x29fb0
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x29fb0
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x1d736
jmp 0x2a0c9
movq %rax, %rbx
jmp 0x2a0c9
jmp 0x29fd4
movq %rax, %rbx
jmp 0x2a0bc
movq %rax, %rbx
jmp 0x2a0e0
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29fff
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x29fff
movq %rax, %rbx
jmp 0x2a026
jmp 0x2a035
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2a021
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2a026
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x1dca2
jmp 0x2a038
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x2a052
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a0a2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2a0a2
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a093
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2a093
jmp 0x2a090
jmp 0x2a08b
movq %rax, %rbx
jmp 0x2a0a2
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2a0a2
callq 0x1e6ee
leaq 0xa8(%rsp), %r14
leaq 0x60(%rsp), %r13
leaq 0xd0(%rsp), %rdi
callq 0x37214
leaq 0xe8(%rsp), %rdi
callq 0x211f6
movq 0x50(%rsp), %rdi
cmpq %r13, %rdi
je 0x2a0e0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x98(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a0fd
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %rbx, %rdi
callq 0x106f0
nop