// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/node/node.cpp
// Function: MapNode::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 MapNode::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<std::pair<std::string, ptr_node_t>> nargs;
	for (auto &c : args)
		nargs.push_back({c.first, c.second->fold(consts)});
	return std::make_shared<MapNode>(path, nargs, token);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x8(%rax)
testb %al, %al
je 0x65479
movq (%r14), %rax
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x40(%rsp), %rsi
movq $0x0, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x3cf06
xorps %xmm0, %xmm0
leaq 0x40(%rsp), %rcx
movaps %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
movq 0x20(%rsp), %rsi
movq (%rsi), %rax
leaq 0x98(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq *(%rax)
leaq 0x8(%r14), %rcx
addq $0x28, %r14
leaq 0x80(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x78(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x98(%rsp), %r8
movq %r14, %r9
callq 0x6849a
movq 0x78(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x80(%rsp), %rcx
movq %rax, 0x80(%rsp)
movq %rcx, 0x8(%rbx)
leaq 0x98(%rsp), %rdi
callq 0x404da
leaq 0x40(%rsp), %rdi
callq 0x1d77a
leaq 0x10(%rsp), %rdi
callq 0x3d168
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x65588
callq 0x1e6ee
jmp 0x65588
movq %rbx, 0x88(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
movq 0xa8(%r14), %r12
movq %r14, 0x90(%rsp)
movq 0xb0(%r14), %r14
cmpq %r14, %r12
je 0x65529
leaq 0x10(%rsp), %r13
leaq 0x40(%rsp), %rbp
leaq 0x20(%rsp), %rbx
movq 0x20(%r12), %rsi
movq (%rsi), %rax
movq %r13, %rdi
movq %r15, %rdx
callq *0x18(%rax)
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x67a7a
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x6dae0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x654f5
callq 0x1e6ee
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x65511
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x65520
callq 0x1e6ee
addq $0x30, %r12
cmpq %r14, %r12
jne 0x654bc
movq 0x90(%rsp), %r9
leaq 0x8(%r9), %rcx
addq $0x28, %r9
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %r8
callq 0x6dbfe
movq 0x40(%rsp), %rax
movq 0x88(%rsp), %rbx
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x48(%rsp), %rcx
movq %rax, 0x48(%rsp)
movq %rcx, 0x8(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x375ca
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x655de
movq %rax, %rbx
leaq 0x98(%rsp), %rdi
callq 0x404da
jmp 0x655b4
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1d77a
leaq 0x10(%rsp), %rdi
callq 0x3d168
jmp 0x655cd
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6560e
callq 0x1e6ee
jmp 0x6560e
movq %rax, %rbx
jmp 0x65604
movq %rax, %rbx
jmp 0x655f5
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3759e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x65604
callq 0x1e6ee
leaq 0x20(%rsp), %rdi
callq 0x375ca
movq %rbx, %rdi
callq 0x106f0