// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/node/node.cpp
// Function: CallBuiltNode::genParser() const
ptr_instruction_t CallBuiltNode::genParser() const
{
	trace_t stack_trace;
	switch (t)
	{
	case TOK_LENGTH:
		if (args.size() > 1)
		{
			throw rossa_error_t(util::format(_TOO_MANY_ARGUMENTS_, {KEYWORD_LENGTH}), token, stack_trace);
		}
		return std::make_shared<LengthI>(args[0]->genParser(), token);
	case TOK_ALLOC:
		if (args.size() > 2)
		{
			throw rossa_error_t(util::format(_TOO_MANY_ARGUMENTS_, {KEYWORD_ALLOC}), token, stack_trace);
		}
		return std::make_shared<AllocI>(args[0]->genParser(), args.size() > 1 ? args[1]->genParser() : nullptr, token);
	case TOK_PARSE:
		if (args.size() > 1)
		{
			throw rossa_error_t(util::format(_TOO_MANY_ARGUMENTS_, {KEYWORD_PARSE}), token, stack_trace);
		}
		return std::make_shared<ParseI>(args[0]->genParser(), token);
	case TOK_CHARN:
		if (args.size() > 1)
		{
			throw rossa_error_t(util::format(_TOO_MANY_ARGUMENTS_, {KEYWORD_CHAR_N}), token, stack_trace);
		}
		return std::make_shared<CharNI>(args[0]->genParser(), token);
	case TOK_CHARS:
		if (args.size() > 1)
		{
			throw rossa_error_t(util::format(_TOO_MANY_ARGUMENTS_, {KEYWORD_CHAR_S}), token, stack_trace);
		}
		return std::make_shared<CharSI>(args[0]->genParser(), token);
	default:
		break;
	}

	throw rossa_error_t(util::format(_UNKNOWN_BUILT_CALL_, {std::to_string(t)}), token, stack_trace);
	return nullptr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, 0xa0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x90(%rsp)
movl 0xa8(%rsi), %eax
cmpl $-0x39, %eax
je 0x51dc5
cmpl $-0x35, %eax
je 0x51d85
cmpl $-0x34, %eax
je 0x51e05
cmpl $-0x26, %eax
je 0x51e84
cmpl $-0x1a, %eax
jne 0x5223b
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jae 0x5205b
movq (%rax), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *(%rax)
addq $0x28, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x58ecf
jmp 0x51e43
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jae 0x51f1b
movq (%rax), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *(%rax)
addq $0x28, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x58f56
jmp 0x51e43
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jae 0x51fbb
movq (%rax), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *(%rax)
addq $0x28, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x58f14
jmp 0x51e43
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jae 0x520fb
movq (%rax), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *(%rax)
addq $0x28, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x58f35
leaq 0x38(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%r14)
andq $0x0, -0x8(%rdi)
callq 0x1d786
leaq 0x18(%rsp), %rdi
callq 0x1d786
leaq 0x90(%rsp), %rdi
callq 0x1cb1a
movq %r14, %rax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jae 0x5219b
movq (%rax), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *(%rax)
movq 0xb0(%rbx), %rax
movq 0xb8(%rbx), %rcx
subq %rax, %rcx
cmpq $0x11, %rcx
jb 0x51ed3
movq 0x10(%rax), %rsi
movq (%rsi), %rax
leaq 0x70(%rsp), %rdi
callq *(%rax)
jmp 0x51edb
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
addq $0x28, %rbx
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x70(%rsp), %rdx
movq %rbx, %rcx
callq 0x58ef0
leaq 0x38(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%r14)
andq $0x0, -0x8(%rdi)
callq 0x1d786
leaq 0x78(%rsp), %rdi
jmp 0x51e59
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r14
leaq 0x26d18(%rip), %rsi     # 0x78c47
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x24692(%rip), %rsi     # 0x765d7
leaq 0x70(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x3f724
addq $0x28, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x5fcf9(%rip), %rsi     # 0xb1ca0
leaq -0x22b3c(%rip), %rdx    # 0x2f472
movq %r14, %rdi
callq 0x106c0
jmp 0x522d0
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r14
leaq 0x26c78(%rip), %rsi     # 0x78c47
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x245fd(%rip), %rsi     # 0x765e2
leaq 0x70(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x3f724
addq $0x28, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x5fc59(%rip), %rsi     # 0xb1ca0
leaq -0x22bdc(%rip), %rdx    # 0x2f472
movq %r14, %rdi
callq 0x106c0
jmp 0x522d0
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r14
leaq 0x26bd8(%rip), %rsi     # 0x78c47
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x242e3(%rip), %rsi     # 0x76368
leaq 0x70(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x3f724
addq $0x28, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x5fbb9(%rip), %rsi     # 0xb1ca0
leaq -0x22c7c(%rip), %rdx    # 0x2f472
movq %r14, %rdi
callq 0x106c0
jmp 0x522d0
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r14
leaq 0x26b38(%rip), %rsi     # 0x78c47
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x244ac(%rip), %rsi     # 0x765d1
leaq 0x70(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x3f724
addq $0x28, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x5fb19(%rip), %rsi     # 0xb1ca0
leaq -0x22d1c(%rip), %rdx    # 0x2f472
movq %r14, %rdi
callq 0x106c0
jmp 0x522d0
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r14
leaq 0x26a98(%rip), %rsi     # 0x78c47
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x243cb(%rip), %rsi     # 0x76590
leaq 0x70(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x1c814
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
callq 0x1f298
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x3f724
addq $0x28, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x5fa79(%rip), %rsi     # 0xb1ca0
leaq -0x22dbc(%rip), %rdx    # 0x2f472
movq %r14, %rdi
callq 0x106c0
jmp 0x522d0
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r14
leaq 0x26a2b(%rip), %rsi     # 0x78c7a
leaq 0x10(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
movl 0xa8(%rbx), %esi
leaq 0x70(%rsp), %rdi
callq 0x1cac0
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xd(%rsp), %rcx
callq 0x1f298
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x58(%rsp), %rdx
callq 0x3f724
addq $0x28, %rbx
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x5f9df(%rip), %rsi     # 0xb1ca0
leaq -0x22e56(%rip), %rdx    # 0x2f472
movq %r14, %rdi
callq 0x106c0
jmp 0x522e4
jmp 0x522f3
jmp 0x522e4
jmp 0x522f3
jmp 0x522e4
jmp 0x522f3
jmp 0x522e4
jmp 0x522f3
jmp 0x522e4
jmp 0x522f3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x101d0
jmp 0x522f9
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x58(%rsp), %rdi
callq 0x1cea0
jmp 0x52315
jmp 0x5230f
jmp 0x5230f
jmp 0x5230f
jmp 0x5230f
jmp 0x5230f
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x70(%rsp), %rdi
callq 0x101d0
jmp 0x52331
jmp 0x5232b
jmp 0x5232b
jmp 0x5232b
jmp 0x5232b
jmp 0x5232b
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x10(%rsp), %rdi
callq 0x101d0
testb %bpl, %bpl
jne 0x52351
jmp 0x5238a
jmp 0x5234e
jmp 0x52370
jmp 0x5234e
jmp 0x5234e
jmp 0x5234e
jmp 0x5234e
movq %rax, %rbx
movq %r14, %rdi
callq 0x102e0
jmp 0x5238a
movq %rax, %rbx
leaq 0x78(%rsp), %rdi
callq 0x1d786
jmp 0x52373
jmp 0x52370
jmp 0x52370
jmp 0x52370
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1d786
jmp 0x5238a
jmp 0x52387
jmp 0x52387
jmp 0x52387
jmp 0x52387
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x1cb1a
movq %rbx, %rdi
callq 0x106f0
nop