// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/node/node.cpp
// Function: VectorNode::fold(std::vector<std::pair<std::vector<unsigned long long, std::allocator<unsigned long long>>, symbol_t>, std::allocator<std::pair<std::vector<unsigned long long, std::allocator<unsigned long long>>, symbol_t>>> const&) const
const ptr_node_t VectorNode::fold(const std::vector<std::pair<std::vector<hash_ull>, symbol_t>> &consts) const
{
	if (isConst())
	{
		auto i = genParser();
		object_t newScope(static_cast<hash_ull>(0));
		trace_t stack_trace;
		auto r = i->evaluate(&newScope, stack_trace);
		return std::make_shared<ContainerNode>(path, r, token);
	}

	std::vector<ptr_node_t> nargs;
	for (auto &c : args)
		if (c != nullptr)
			nargs.push_back(c->fold(consts));
	return std::make_shared<VectorNode>(path, nargs, scoped, token);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x8(%rax)
testb %al, %al
je 0x5a55c
movq (%r14), %rax
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x20(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x50(%rsp), %rdi
callq 0x3cf06
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
leaq 0x68(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq *(%rax)
leaq 0x8(%r14), %rcx
addq $0x28, %r14
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x40(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x68(%rsp), %r8
movq %r14, %r9
callq 0x6849a
movq 0x40(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x48(%rsp), %rcx
movq %rax, 0x48(%rsp)
movq %rcx, 0x8(%rbx)
leaq 0x68(%rsp), %rdi
callq 0x404da
leaq 0x20(%rsp), %rdi
callq 0x1d77a
leaq 0x50(%rsp), %rdi
callq 0x3d168
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5a628
callq 0x1e6ee
jmp 0x5a628
movq %rbx, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0xa8(%r14), %rbp
movq 0xb0(%r14), %rbx
cmpq %rbx, %rbp
je 0x5a5c9
leaq 0x10(%rsp), %r12
leaq 0x20(%rsp), %r13
cmpq $0x0, (%rbp)
je 0x5a5c0
movq (%rbp), %rsi
movq (%rsi), %rax
movq %r12, %rdi
movq %r15, %rdx
callq *0x18(%rax)
movq %r13, %rdi
movq %r12, %rsi
callq 0x3725c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5a5c0
callq 0x1e6ee
addq $0x10, %rbp
cmpq %rbx, %rbp
jne 0x5a58f
leaq 0x8(%r14), %rcx
leaq 0xc0(%r14), %r9
addq $0x28, %r14
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %r14, (%rsp)
leaq 0x10(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x20(%rsp), %r8
callq 0x68528
movq 0x10(%rsp), %rax
movq 0x60(%rsp), %rbx
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x18(%rsp), %rcx
movq %rax, 0x18(%rsp)
movq %rcx, 0x8(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x37214
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a678
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x404da
jmp 0x5a64e
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x1d77a
leaq 0x50(%rsp), %rdi
callq 0x3d168
jmp 0x5a667
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5a699
callq 0x1e6ee
jmp 0x5a699
movq %rax, %rbx
jmp 0x5a68f
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5a68f
callq 0x1e6ee
leaq 0x20(%rsp), %rdi
callq 0x37214
movq %rbx, %rdi
callq 0x106f0
nop