// File: Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseUntilNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*, std::shared_ptr<Node> const&, bool const&)
ptr_node_t node_parser_t::parseUntilNode(std::vector<node_scope_t> *scopes, const ptr_node_t &a, const bool &inclusive)
{
	nextToken();

	auto b = parseEquNode(scopes);
	if (!b)
		return logErrorN(_FAILURE_PARSE_CODE_, currentToken);

	if (currentToken.type == ':')
	{
		nextToken();
		auto step = parseEquNode(scopes);
		if (!step)
			return logErrorN(_FAILURE_PARSE_CODE_, currentToken);

		return std::make_shared<UntilNode>(*scopes, a, b, step, inclusive, currentToken);
	}

	return std::make_shared<UntilNode>(*scopes, a, b, nullptr, inclusive, currentToken);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xe8(%rbp)
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x38fd0
movq -0xd8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x3f500
leaq -0x38(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x4711d
leaq -0x59(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x119d0
movq -0xf0(%rbp), %rdx
leaq 0x10a183(%rip), %rsi    # 0x151226
leaq -0x58(%rbp), %rdi
callq 0x24740
jmp 0x470ae
movq -0xd8(%rbp), %rsi
movq -0xe8(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x58(%rbp), %rdx
callq 0x3f820
jmp 0x470ce
leaq -0x58(%rbp), %rdi
callq 0x11360
leaq -0x59(%rbp), %rdi
callq 0x11600
movl $0x1, -0x70(%rbp)
jmp 0x4730a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x4710f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x11360
leaq -0x59(%rbp), %rdi
callq 0x11600
jmp 0x47323
movq -0xd8(%rbp), %rax
cmpl $0x3a, 0xd0(%rax)
jne 0x472a3
movq -0xd8(%rbp), %rdi
callq 0x38fd0
jmp 0x4713f
movq -0xd8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x3f500
jmp 0x47155
leaq -0x80(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x47221
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
callq 0x119d0
movq -0xf8(%rbp), %rdx
leaq 0x10a09f(%rip), %rsi    # 0x151226
leaq -0xa0(%rbp), %rdi
callq 0x24740
jmp 0x47195
movq -0xd8(%rbp), %rsi
movq -0xe8(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0xa0(%rbp), %rdx
callq 0x3f820
jmp 0x471b8
leaq -0xa0(%rbp), %rdi
callq 0x11360
leaq -0xa1(%rbp), %rdi
callq 0x11600
movl $0x1, -0x70(%rbp)
jmp 0x4728a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x47323
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x47213
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x11360
leaq -0xa1(%rbp), %rdi
callq 0x11600
jmp 0x47295
movq -0xd8(%rbp), %rcx
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %r9
addq $0x58, %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0xb8(%rbp), %rdi
leaq -0x38(%rbp), %rcx
leaq -0x80(%rbp), %r8
callq 0x58c30
jmp 0x47254
movq -0xe8(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x58cd0
leaq -0xb8(%rbp), %rdi
callq 0x58d00
movl $0x1, -0x70(%rbp)
jmp 0x4728a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x47295
leaq -0x80(%rbp), %rdi
callq 0x24b20
jmp 0x4730a
leaq -0x80(%rbp), %rdi
callq 0x24b20
jmp 0x47323
movq -0xd8(%rbp), %rcx
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq $0x0, -0xd0(%rbp)
movq -0x28(%rbp), %r9
addq $0x58, %rcx
movq %rsp, %rax
movq %rcx, (%rax)
leaq -0xc8(%rbp), %rdi
leaq -0x38(%rbp), %rcx
leaq -0xd0(%rbp), %r8
callq 0x58d20
jmp 0x472e4
movq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x58cd0
leaq -0xc8(%rbp), %rdi
callq 0x58d00
movl $0x1, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x24b20
movq -0xe0(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x24b20
movq -0x68(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)