// File: /workspace/github_cpp_makefile_star2_O3/Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseClassNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseClassNode(std::vector<node_scope_t> *scopes)
{
	auto type = currentToken.type;
	nextToken();
	auto key = ROSSA_HASH(currentToken.valueString);
	nextToken();
	ptr_node_t extends = nullptr;
	if (currentToken.type == ':')
	{
		nextToken();
		extends = parseUnitNode(scopes);
	}
	if (currentToken.type != '{')
		return logErrorN(util::format(_EXPECTED_ERROR_, {"{"}), currentToken);
	nextToken();
	std::vector<ptr_node_t> body;
	scopes->push_back({key});
	while (currentToken.type != NULL_TOK)
	{
		if (currentToken.type == '}')
			break;

		if (auto e = parseExprNode(scopes))
			body.push_back(e);
		else
			return logErrorN(_FAILURE_PARSE_CODE_, currentToken);
	}
	if (currentToken.type != '}')
		return logErrorN(util::format(_EXPECTED_ERROR_, {"}"}), currentToken);
	nextToken();

	scopes->pop_back();
	return std::make_shared<ClassNode>(*scopes, key, type, body, extends, currentToken);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl 0xd0(%rsi), %eax
movl %eax, 0x3c(%rsp)
movq %rsi, %rdi
callq 0x2549e
leaq 0xb0(%rbx), %r15
leaq 0x7fad0(%rip), %r13     # 0xb58f8
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movq %r15, %rdx
callq 0x20d1b
movq 0x8(%r13), %rsi
cmpq %rsi, %rax
je 0x35e5c
movq (%r13), %r13
movq %r13, %rdi
movq %r15, %rdx
callq 0x20d1b
movq %rax, %rbp
subq %r13, %rbp
sarq $0x5, %rbp
jmp 0x35e76
movq %r13, %rdi
movq %r15, %rsi
callq 0x20cde
movq 0x8(%r13), %rbp
subq (%r13), %rbp
sarq $0x5, %rbp
decq %rbp
movq %rbp, 0xa8(%rsp)
movq %rbx, %rdi
callq 0x2549e
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movl 0xd0(%rbx), %eax
xorl %r13d, %r13d
cmpl $0x3a, %eax
jne 0x35ece
movq %rbx, %rdi
callq 0x2549e
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2c34e
movq (%r15), %rax
movq 0x8(%r15), %r13
movq %rax, 0x60(%rsp)
movq %r13, 0x68(%rsp)
movl 0xd0(%rbx), %eax
leaq 0x58(%rbx), %r15
cmpl $0x7b, %eax
jne 0x360dc
movq %rbx, %rdi
callq 0x2549e
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
leaq 0x10(%rsp), %rsi
movq %rbp, (%rsi)
movups %xmm0, 0x8(%rsi)
movq %rax, 0x18(%rsi)
movq %r12, %rdi
callq 0x216b8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x35f24
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
leaq 0x40(%rsp), %rbp
leaq 0x70(%rsp), %r13
movl 0xd0(%rbx), %eax
cmpl $0x7d, %eax
je 0x35f77
testl %eax, %eax
je 0x36017
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x25dc8
cmpq $0x0, 0x40(%rsp)
je 0x360ab
movq %r13, %rdi
movq %rbp, %rsi
callq 0x36d3e
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x35f2e
callq 0x1e5bc
jmp 0x35f2e
movq %rbx, %rdi
callq 0x2549e
movq 0x8(%r12), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r12)
movq -0x18(%rax), %rdi
testq %rdi, %rdi
je 0x35fa2
movq -0x8(%rax), %rsi
subq %rdi, %rsi
callq 0x103d0
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x68(%rsp), %rax
leaq 0x18(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0xb0(%rsp), %r8
leaq 0x44(%rsp), %r9
movq %r12, %rcx
pushq %r15
pushq %rax
pushq %r13
callq 0x3baaa
addq $0x20, %rsp
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%r14)
leaq 0x70(%rsp), %rdi
callq 0x36cf0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x36002
callq 0x1e5bc
movq %r14, %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, (%r14)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x6(%r14)
movq $0xe, -0x8(%r14)
movb $0x0, 0xe(%r14)
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movw $0x7d, (%r12)
movq $0x1, -0x8(%r12)
leaq 0xb0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x20b38
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x47db4
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq %r15, %rcx
callq 0x29658
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4d85e(%rip), %rsi     # 0x83919
leaq 0x4d86c(%rip), %rdx     # 0x8392e
leaq 0x10(%rsp), %rdi
callq 0x1e698
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq %r15, %rcx
callq 0x29658
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, (%r14)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x6(%r14)
movq $0xe, -0x8(%r14)
movb $0x0, 0xe(%r14)
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
movw $0x7b, (%r12)
movq $0x1, -0x8(%r12)
leaq 0x70(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xb0(%rsp), %rcx
movl $0x1, %edx
callq 0x20b38
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x47db4
leaq 0x10(%rsp), %rdx
movq %rbx, %rsi
movq %r15, %rcx
callq 0x29658
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36190
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x36190
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x1db60
jmp 0x3619f
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x361bc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x362bb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x362bb
jmp 0x362a9
jmp 0x362a9
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x362ac
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
jmp 0x3628e
movq %rax, %rbx
jmp 0x362bb
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3622f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x3622f
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x1db60
jmp 0x3625f
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x36298
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x36298
jmp 0x36295
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x3627c
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x362ac
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x362ac
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x362ac
callq 0x1e5bc
jmp 0x362ac
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x36cf0
movq 0x68(%rsp), %r13
testq %r13, %r13
je 0x362c8
movq %r13, %rdi
callq 0x1e5bc
movq %rbx, %rdi
callq 0x106f0