// File: Nallantli[P]Rossa/main/rossa/node/node.cpp
// Function: ClassNode::genParser() const
ptr_instruction_t ClassNode::genParser() const
{
	std::vector<ptr_instruction_t> is;
	for (auto &e : this->body)
		is.push_back(e->genParser());
	auto bodyI = std::make_shared<ScopeI>(is, token);
	trace_t stack_trace;

	scope_type_enum ot;
	switch (type)
	{
	case TOK_STRUCT:
		ot = scope_type_enum::SCOPE_STRUCT;
		break;
	case TOK_STATIC:
		ot = scope_type_enum::SCOPE_STATIC;
		break;
	case TOK_VIRTUAL:
		ot = scope_type_enum::SCOPE_VIRTUAL;
		break;
	default:
		throw rossa_error_t(_INVALID_OBJECT_TYPE_, token, stack_trace);
	}

	if (extends == nullptr)
		return std::make_shared<ClassI>(key, ot, bodyI, nullptr, token);
	else
		return std::make_shared<ClassI>(key, ot, bodyI, extends->genParser(), token);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x118(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x28(%rbp), %rdi
callq 0xe52f0
movq -0x108(%rbp), %rax
addq $0xb8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0xe5310
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0xe5340
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xe5370
testb $0x1, %al
jne 0xd5b76
jmp 0xd5beb
leaq -0x38(%rbp), %rdi
callq 0xe53b0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x2d030
movq %rax, %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x58(%rbp), %rdi
callq *%rax
jmp 0xd5b9d
leaq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xe5400
jmp 0xd5bac
leaq -0x58(%rbp), %rdi
callq 0x2a4e0
leaq -0x38(%rbp), %rdi
callq 0xe5430
jmp 0xd5b63
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd5eed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2a4e0
jmp 0xd5eed
movq -0x108(%rbp), %rdx
addq $0x28, %rdx
leaq -0x78(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0xe5450
jmp 0xd5c05
leaq -0x90(%rbp), %rdi
callq 0x24b80
movq -0x108(%rbp), %rax
movl 0xb0(%rax), %eax
movl %eax, -0x11c(%rbp)
subl $-0x2f, %eax
je 0xd5c63
jmp 0xd5c2b
movl -0x11c(%rbp), %eax
subl $-0x1e, %eax
je 0xd5c54
jmp 0xd5c38
movl -0x11c(%rbp), %eax
subl $-0x1d, %eax
jne 0xd5c72
jmp 0xd5c45
movl $0x1, -0x94(%rbp)
jmp 0xd5d54
movl $0x2, -0x94(%rbp)
jmp 0xd5d54
movl $0x4, -0x94(%rbp)
jmp 0xd5d54
movb $0x1, -0xba(%rbp)
movl $0xa8, %edi
callq 0x112b0
movq %rax, -0x130(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x119d0
movq -0x128(%rbp), %rdx
leaq 0x7db10(%rip), %rsi     # 0x1537bb
leaq -0xb8(%rbp), %rdi
callq 0x24740
jmp 0xd5cb9
movq -0x130(%rbp), %rdi
movq -0x108(%rbp), %rdx
addq $0x28, %rdx
leaq -0xb8(%rbp), %rsi
leaq -0x90(%rbp), %rcx
callq 0x9c360
jmp 0xd5ce0
movq -0x130(%rbp), %rdi
movb $0x0, -0xba(%rbp)
leaq 0x10af8b(%rip), %rsi    # 0x1e0c80
leaq -0x7b35c(%rip), %rdx    # 0x5a9a0
callq 0x11970
jmp 0xd5eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd5d2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x11360
leaq -0xb9(%rbp), %rdi
callq 0x11600
testb $0x1, -0xba(%rbp)
jne 0xd5d43
jmp 0xd5d4f
movq -0x130(%rbp), %rdi
callq 0x11420
jmp 0xd5ed8
movq -0x108(%rbp), %rdi
addq $0xd0, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe6230
testb $0x1, %al
jne 0xd5d71
jmp 0xd5df0
movq -0x108(%rbp), %r9
movq %r9, %rsi
addq $0xa8, %rsi
movq $0x0, -0xd8(%rbp)
addq $0x28, %r9
leaq -0xd0(%rbp), %rdi
leaq -0x94(%rbp), %rdx
leaq -0x78(%rbp), %rcx
leaq -0xd8(%rbp), %r8
callq 0xe6260
jmp 0xd5db1
movq -0x118(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xe6300
leaq -0xd0(%rbp), %rdi
callq 0xe6330
movl $0x1, -0xdc(%rbp)
jmp 0xd5eaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xd5ed8
movq -0x108(%rbp), %rdi
movq %rdi, %rax
addq $0xa8, %rax
movq %rax, -0x138(%rbp)
addq $0xd0, %rdi
callq 0x2d030
movq %rax, %rsi
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x100(%rbp), %rdi
callq *%rax
jmp 0xd5e27
movq -0x138(%rbp), %rsi
movq -0x108(%rbp), %r9
addq $0x28, %r9
leaq -0xf0(%rbp), %rdi
leaq -0x94(%rbp), %rdx
leaq -0x78(%rbp), %rcx
leaq -0x100(%rbp), %r8
callq 0xe6350
jmp 0xd5e59
movq -0x118(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xe6300
leaq -0xf0(%rbp), %rdi
callq 0xe6330
leaq -0x100(%rbp), %rdi
callq 0x2a4e0
movl $0x1, -0xdc(%rbp)
jmp 0xd5eaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x2a4e0
jmp 0xd5ed8
leaq -0x90(%rbp), %rdi
callq 0x24e60
leaq -0x78(%rbp), %rdi
callq 0xe5500
leaq -0x28(%rbp), %rdi
callq 0xe55f0
movq -0x110(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x90(%rbp), %rdi
callq 0x24e60
leaq -0x78(%rbp), %rdi
callq 0xe5500
leaq -0x28(%rbp), %rdi
callq 0xe55f0
movq -0x60(%rbp), %rdi
callq 0x119c0
nop