// File: 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
movq %rsp, %rbp
subq $0x440, %rsp            # imm = 0x440
movq %rdi, -0x318(%rbp)
movq %rdi, %rax
movq %rax, -0x310(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x38fd0
movq -0x300(%rbp), %rdi
movq %rdi, %rax
addq $0x58, %rax
movq %rax, -0x308(%rbp)
addq $0xb0, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x570a0
movq -0x308(%rbp), %rsi
movq %rax, -0x20(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2ee00
movq -0x300(%rbp), %rdi
callq 0x38fd0
jmp 0x40937
movq -0x300(%rbp), %rax
cmpl $0x28, 0xd0(%rax)
je 0x40c6b
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x119d0
movq -0x320(%rbp), %rdx
leaq 0x110824(%rip), %rsi    # 0x151190
leaq -0xf0(%rbp), %rdi
callq 0x24740
jmp 0x4097a
movb $0x1, -0x14a(%rbp)
leaq -0x140(%rbp), %rax
movq %rax, -0x330(%rbp)
movq %rax, -0x148(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x119d0
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rdx
leaq 0x10f7d0(%rip), %rsi    # 0x15018e
callq 0x24740
jmp 0x409c5
movb $0x0, -0x14a(%rbp)
leaq -0x140(%rbp), %rax
movq %rax, -0x120(%rbp)
movq $0x1, -0x118(%rbp)
leaq -0x14b(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x26e30
movq -0x338(%rbp), %rcx
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rdx
leaq -0x110(%rbp), %rdi
callq 0x2d6a0
jmp 0x40a1b
leaq -0xd0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
callq 0x9e250
jmp 0x40a37
movq -0x300(%rbp), %rsi
movq -0x318(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0xd0(%rbp), %rdx
callq 0x3f820
jmp 0x40a5a
leaq -0xd0(%rbp), %rdi
callq 0x11360
leaq -0x110(%rbp), %rdi
callq 0x25b00
leaq -0x14b(%rbp), %rdi
callq 0x279c0
leaq -0x140(%rbp), %rax
movq %rax, -0x348(%rbp)
addq $0x20, %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x350(%rbp)
callq 0x11360
movq -0x348(%rbp), %rcx
movq -0x350(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x340(%rbp)
jne 0x40a97
leaq -0x149(%rbp), %rdi
callq 0x11600
leaq -0xf0(%rbp), %rdi
callq 0x11360
leaq -0xf1(%rbp), %rdi
callq 0x11600
movl $0x1, -0x150(%rbp)
jmp 0x414e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x41500
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40c5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40bea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40b92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40b86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x11360
leaq -0x110(%rbp), %rdi
callq 0x25b00
leaq -0x14b(%rbp), %rdi
callq 0x279c0
leaq -0x140(%rbp), %rax
movq %rax, -0x360(%rbp)
addq $0x20, %rax
movq %rax, -0x358(%rbp)
movq -0x358(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x368(%rbp)
callq 0x11360
movq -0x360(%rbp), %rcx
movq -0x368(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x358(%rbp)
jne 0x40bb7
jmp 0x40bea
leaq -0x149(%rbp), %rdi
callq 0x11600
testb $0x1, -0x14a(%rbp)
jne 0x40c01
jmp 0x40c4e
movq -0x148(%rbp), %rax
leaq -0x140(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x370(%rbp)
je 0x40c4c
movq -0x370(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x378(%rbp)
callq 0x11360
movq -0x378(%rbp), %rax
leaq -0x140(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x370(%rbp)
jne 0x40c1b
jmp 0x40c4e
leaq -0xf0(%rbp), %rdi
callq 0x11360
leaq -0xf1(%rbp), %rdi
callq 0x11600
jmp 0x41500
movq -0x300(%rbp), %rdi
callq 0x38fd0
jmp 0x40c79
leaq -0x168(%rbp), %rdi
callq 0x57390
movl $0x0, -0x16c(%rbp)
movq -0x300(%rbp), %rax
cmpl $0x29, 0xd0(%rax)
je 0x4146d
cmpl $0x0, -0x16c(%rbp)
jle 0x40ff4
movq -0x300(%rbp), %rax
cmpl $0x2c, 0xd0(%rax)
je 0x40fcd
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x380(%rbp)
callq 0x119d0
movq -0x380(%rbp), %rdx
leaq 0x1104ab(%rip), %rsi    # 0x151190
leaq -0x1b0(%rbp), %rdi
callq 0x24740
jmp 0x40cf3
movb $0x1, -0x20a(%rbp)
leaq -0x200(%rbp), %rax
movq %rax, -0x390(%rbp)
movq %rax, -0x208(%rbp)
leaq -0x209(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x119d0
movq -0x390(%rbp), %rdi
movq -0x388(%rbp), %rdx
leaq 0x1106b9(%rip), %rsi    # 0x1513f0
callq 0x24740
jmp 0x40d3e
movb $0x0, -0x20a(%rbp)
leaq -0x200(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq $0x1, -0x1d8(%rbp)
leaq -0x20b(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x26e30
movq -0x398(%rbp), %rcx
movq -0x1e0(%rbp), %rsi
movq -0x1d8(%rbp), %rdx
leaq -0x1d0(%rbp), %rdi
callq 0x2d6a0
jmp 0x40d94
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
leaq -0x1d0(%rbp), %rdx
callq 0x9e250
jmp 0x40db0
movq -0x300(%rbp), %rsi
movq -0x318(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x190(%rbp), %rdx
callq 0x3f820
jmp 0x40dd3
leaq -0x190(%rbp), %rdi
callq 0x11360
leaq -0x1d0(%rbp), %rdi
callq 0x25b00
leaq -0x20b(%rbp), %rdi
callq 0x279c0
leaq -0x200(%rbp), %rax
movq %rax, -0x3a8(%rbp)
addq $0x20, %rax
movq %rax, -0x3a0(%rbp)
movq -0x3a0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x11360
movq -0x3a8(%rbp), %rcx
movq -0x3b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3a0(%rbp)
jne 0x40e10
leaq -0x209(%rbp), %rdi
callq 0x11600
leaq -0x1b0(%rbp), %rdi
callq 0x11360
leaq -0x1b1(%rbp), %rdi
callq 0x11600
movl $0x1, -0x150(%rbp)
jmp 0x414c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40fbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40f4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40ef4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x40ee8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x11360
leaq -0x1d0(%rbp), %rdi
callq 0x25b00
leaq -0x20b(%rbp), %rdi
callq 0x279c0
leaq -0x200(%rbp), %rax
movq %rax, -0x3c0(%rbp)
addq $0x20, %rax
movq %rax, -0x3b8(%rbp)
movq -0x3b8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x11360
movq -0x3c0(%rbp), %rcx
movq -0x3c8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3b8(%rbp)
jne 0x40f19
jmp 0x40f4c
leaq -0x209(%rbp), %rdi
callq 0x11600
testb $0x1, -0x20a(%rbp)
jne 0x40f63
jmp 0x40fb0
movq -0x208(%rbp), %rax
leaq -0x200(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x3d0(%rbp)
je 0x40fae
movq -0x3d0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3d8(%rbp)
callq 0x11360
movq -0x3d8(%rbp), %rax
leaq -0x200(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x3d0(%rbp)
jne 0x40f7d
jmp 0x40fb0
leaq -0x1b0(%rbp), %rdi
callq 0x11360
leaq -0x1b1(%rbp), %rdi
callq 0x11600
jmp 0x414d6
movq -0x300(%rbp), %rdi
callq 0x38fd0
jmp 0x40fdb
jmp 0x40ff4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x414d6
movq -0x300(%rbp), %rsi
movl -0x16c(%rbp), %eax
incl %eax
movl %eax, -0x16c(%rbp)
movq -0x18(%rbp), %rdx
leaq -0x220(%rbp), %rdi
callq 0x3f500
jmp 0x4101b
leaq -0x220(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x4102d
jmp 0x4105e
leaq -0x168(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x57650
jmp 0x41042
jmp 0x41117
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x41301
leaq -0x241(%rbp), %rdi
movq %rdi, -0x3e0(%rbp)
callq 0x119d0
movq -0x3e0(%rbp), %rdx
leaq 0x110120(%rip), %rsi    # 0x15119f
leaq -0x240(%rbp), %rdi
callq 0x24740
jmp 0x4108d
movq -0x300(%rbp), %rsi
movq -0x318(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x240(%rbp), %rdx
callq 0x3f820
jmp 0x410b0
leaq -0x240(%rbp), %rdi
callq 0x11360
leaq -0x241(%rbp), %rdi
callq 0x11600
movl $0x1, -0x150(%rbp)
jmp 0x41121
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x41106
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x11360
leaq -0x241(%rbp), %rdi
callq 0x11600
jmp 0x41301
movl $0x0, -0x150(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x24b20
movl -0x150(%rbp), %eax
testl %eax, %eax
jne 0x414c8
jmp 0x4113d
movq -0x300(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
jne 0x41468
leaq -0x289(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x119d0
movq -0x3e8(%rbp), %rdx
leaq 0x11001e(%rip), %rsi    # 0x151190
leaq -0x288(%rbp), %rdi
callq 0x24740
jmp 0x41180
movb $0x1, -0x2e2(%rbp)
leaq -0x2d8(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movq %rax, -0x2e0(%rbp)
leaq -0x2e1(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x119d0
movq -0x3f8(%rbp), %rdi
movq -0x3f0(%rbp), %rdx
leaq 0x111b25(%rip), %rsi    # 0x152ce9
callq 0x24740
jmp 0x411cb
movb $0x0, -0x2e2(%rbp)
leaq -0x2d8(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movq $0x1, -0x2b0(%rbp)
leaq -0x2e3(%rbp), %rdi
movq %rdi, -0x400(%rbp)
callq 0x26e30
movq -0x400(%rbp), %rcx
movq -0x2b8(%rbp), %rsi
movq -0x2b0(%rbp), %rdx
leaq -0x2a8(%rbp), %rdi
callq 0x2d6a0
jmp 0x41221
leaq -0x268(%rbp), %rdi
leaq -0x288(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x9e250
jmp 0x4123d
movq -0x300(%rbp), %rsi
movq -0x318(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x268(%rbp), %rdx
callq 0x3f820
jmp 0x41260
leaq -0x268(%rbp), %rdi
callq 0x11360
leaq -0x2a8(%rbp), %rdi
callq 0x25b00
leaq -0x2e3(%rbp), %rdi
callq 0x279c0
leaq -0x2d8(%rbp), %rax
movq %rax, -0x410(%rbp)
addq $0x20, %rax
movq %rax, -0x408(%rbp)
movq -0x408(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x418(%rbp)
callq 0x11360
movq -0x410(%rbp), %rcx
movq -0x418(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x408(%rbp)
jne 0x4129d
leaq -0x2e1(%rbp), %rdi
callq 0x11600
leaq -0x288(%rbp), %rdi
callq 0x11360
leaq -0x289(%rbp), %rdi
callq 0x11600
movl $0x1, -0x150(%rbp)
jmp 0x414c8
leaq -0x220(%rbp), %rdi
callq 0x24b20
jmp 0x414d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x4145a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x413ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x41392
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x41386
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x11360
leaq -0x2a8(%rbp), %rdi
callq 0x25b00
leaq -0x2e3(%rbp), %rdi
callq 0x279c0
leaq -0x2d8(%rbp), %rax
movq %rax, -0x428(%rbp)
addq $0x20, %rax
movq %rax, -0x420(%rbp)
movq -0x420(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x430(%rbp)
callq 0x11360
movq -0x428(%rbp), %rcx
movq -0x430(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x420(%rbp)
jne 0x413b7
jmp 0x413ea
leaq -0x2e1(%rbp), %rdi
callq 0x11600
testb $0x1, -0x2e2(%rbp)
jne 0x41401
jmp 0x4144e
movq -0x2e0(%rbp), %rax
leaq -0x2d8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x438(%rbp)
je 0x4144c
movq -0x438(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x440(%rbp)
callq 0x11360
movq -0x440(%rbp), %rax
leaq -0x2d8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x438(%rbp)
jne 0x4141b
jmp 0x4144e
leaq -0x288(%rbp), %rdi
callq 0x11360
leaq -0x289(%rbp), %rdi
callq 0x11600
jmp 0x414d6
jmp 0x40c8f
movq -0x300(%rbp), %rdi
callq 0x38fd0
jmp 0x4147b
movq -0x18(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
leaq -0x20(%rbp), %rdx
leaq -0x168(%rbp), %rcx
leaq -0xa0(%rbp), %r8
callq 0x57ae0
jmp 0x4149f
movq -0x318(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0x57b70
leaq -0x2f8(%rbp), %rdi
callq 0x57ba0
movl $0x1, -0x150(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x574c0
jmp 0x414e4
leaq -0x168(%rbp), %rdi
callq 0x574c0
jmp 0x41500
leaq -0xa0(%rbp), %rdi
callq 0x2a480
movq -0x310(%rbp), %rax
addq $0x440, %rsp            # imm = 0x440
popq %rbp
retq
leaq -0xa0(%rbp), %rdi
callq 0x2a480
movq -0xa8(%rbp), %rdi
callq 0x119c0
nopl (%rax,%rax)