// File: Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseNewNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseNewNode(std::vector<node_scope_t> *scopes)
{
	nextToken();

	auto body = parseUnitNode(scopes);
	if (body->getType() != Node::type_t::CALL_NODE)
		return logErrorN(_EXPECTED_OBJECT_NAME_, currentToken);
	auto object = reinterpret_cast<CallNode *>(body.get())->getCallee();
	auto params = std::make_shared<VectorNode>(*scopes, (reinterpret_cast<CallNode *>(body.get())->getArgs()), false, currentToken);

	return std::make_shared<NewNode>(*scopes, object, params, currentToken);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xd8(%rbp)
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x38fd0
movq -0xc8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x28(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x44bf0
movq -0xc0(%rbp), %rdi
callq 0x2d030
movq %rax, %rdi
callq 0xd2b20
movl %eax, -0xb4(%rbp)
jmp 0x449df
movl -0xb4(%rbp), %eax
cmpl $0x1, %eax
je 0x44a97
leaq -0x59(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x119d0
movq -0xe0(%rbp), %rdx
leaq 0x10c830(%rip), %rsi    # 0x15123c
leaq -0x58(%rbp), %rdi
callq 0x24740
jmp 0x44a17
movq -0xc8(%rbp), %rsi
movq -0xd8(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x58(%rbp), %rdx
callq 0x3f820
jmp 0x44a37
leaq -0x58(%rbp), %rdi
callq 0x11360
leaq -0x59(%rbp), %rdi
callq 0x11600
movl $0x1, -0x60(%rbp)
jmp 0x44bb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x44bd1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x44a89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x11360
leaq -0x59(%rbp), %rdi
callq 0x11600
jmp 0x44bd1
leaq -0x28(%rbp), %rdi
callq 0x327c0
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0xd6bb0
jmp 0x44aae
movq -0x18(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x327c0
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0xd6bf0
jmp 0x44ad3
movq -0xe8(%rbp), %rsi
movq -0xc8(%rbp), %r8
movb $0x0, -0x99(%rbp)
addq $0x58, %r8
leaq -0x80(%rbp), %rdi
leaq -0x98(%rbp), %rdx
leaq -0x99(%rbp), %rcx
callq 0x58610
jmp 0x44b05
leaq -0x98(%rbp), %rdi
callq 0x574c0
movq -0xc8(%rbp), %r8
movq -0x18(%rbp), %rsi
addq $0x58, %r8
leaq -0xb0(%rbp), %rdi
leaq -0x70(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x586a0
jmp 0x44b36
movq -0xd8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x58730
leaq -0xb0(%rbp), %rdi
callq 0x58760
movl $0x1, -0x60(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x574a0
leaq -0x70(%rbp), %rdi
callq 0x24b20
jmp 0x44bb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x44bad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x574c0
jmp 0x44bad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x574a0
leaq -0x70(%rbp), %rdi
callq 0x24b20
jmp 0x44bd1
leaq -0x28(%rbp), %rdi
callq 0x24b20
movq -0xd0(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x24b20
movq -0x30(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)