// File: Nallantli[P]Rossa/main/rossa/node/node.cpp
// Function: ClassNode::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 ClassNode::fold(const std::vector<std::pair<std::vector<hash_ull>, symbol_t>> &consts) const
{
	std::vector<ptr_node_t> nbody;
	for (auto &c : body)
		nbody.push_back(c->fold(consts));

	if (extends)
		return std::make_shared<ClassNode>(path, key, type, nbody, extends->fold(consts), token);
	else
		return std::make_shared<ClassNode>(path, key, type, nbody, nullptr, token);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x57390
movq -0xb8(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0xe5310
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0xe5340
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xe5370
testb $0x1, %al
jne 0xd637a
jmp 0xd63f4
leaq -0x40(%rbp), %rdi
callq 0xe53b0
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x2d030
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x60(%rbp), %rdi
callq *%rax
jmp 0xd63a6
leaq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x57650
jmp 0xd63b5
leaq -0x60(%rbp), %rdi
callq 0x24b20
leaq -0x40(%rbp), %rdi
callq 0xe5430
jmp 0xd6367
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xd6589
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x24b20
jmp 0xd6589
movq -0xb8(%rbp), %rdi
addq $0xd0, %rdi
callq 0x57630
testb $0x1, %al
jne 0xd6410
jmp 0xd64f7
movq -0xb8(%rbp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, -0xe0(%rbp)
movq %rdi, %rax
addq $0xa8, %rax
movq %rax, -0xd8(%rbp)
movq %rdi, %rax
addq $0xb0, %rax
movq %rax, -0xd0(%rbp)
addq $0xd0, %rdi
callq 0x2d030
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x90(%rbp), %rdi
callq *%rax
jmp 0xd646a
movq -0xd0(%rbp), %rcx
movq -0xd8(%rbp), %rdx
movq -0xe0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
addq $0x28, %rdi
movq %rsp, %rax
movq %rdi, (%rax)
leaq -0x80(%rbp), %rdi
leaq -0x30(%rbp), %r8
leaq -0x90(%rbp), %r9
callq 0xe63f0
jmp 0xd64a6
movq -0xc8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x59f70
leaq -0x80(%rbp), %rdi
callq 0x59fa0
leaq -0x90(%rbp), %rdi
callq 0x24b20
movl $0x1, -0x94(%rbp)
jmp 0xd6570
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x24b20
jmp 0xd6589
movq -0xb8(%rbp), %rdi
movq %rdi, %rsi
addq $0x8, %rsi
movq %rdi, %rdx
addq $0xa8, %rdx
movq %rdi, %rcx
addq $0xb0, %rcx
movq $0x0, -0xb0(%rbp)
addq $0x28, %rdi
movq %rsp, %rax
movq %rdi, (%rax)
leaq -0xa8(%rbp), %rdi
leaq -0x30(%rbp), %r8
leaq -0xb0(%rbp), %r9
callq 0xe6490
jmp 0xd6547
movq -0xc8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x59f70
leaq -0xa8(%rbp), %rdi
callq 0x59fa0
movl $0x1, -0x94(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x574c0
movq -0xc0(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
leaq -0x30(%rbp), %rdi
callq 0x574c0
movq -0x68(%rbp), %rdi
callq 0x119c0
nopl (%rax,%rax)