// File: Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseEquNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseEquNode(std::vector<node_scope_t> *scopes)
{
	if (currentToken.type == NULL_TOK)
		return logErrorN(_UNEXPECTED_TERMINATION_, currentToken);

	if (auto ret = parseUnitNode(scopes))
	{
		if (currentToken.type != NULL_TOK)
		{
			switch (currentToken.type)
			{
			case TOK_UNTILT:
				return parseUntilNode(scopes, ret, true);
			case TOK_UNTILF:
				return parseUntilNode(scopes, ret, false);
			case TOK_OPR:
				ret = parseBinOpNode(scopes, ret);
				break;
			default:
				break;
			}
			if (currentToken.type == '?')
				return parseThenNode(scopes, ret);
		}

		return ret;
	}

	return logErrorN(_FAILURE_PARSE_CODE_, currentToken);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpl $0x0, 0xd0(%rax)
jne 0x3f5d1
leaq -0x39(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x119d0
movq -0xc8(%rbp), %rdx
leaq 0x111d25(%rip), %rsi    # 0x151283
leaq -0x38(%rbp), %rdi
callq 0x24740
jmp 0x3f569
movq -0xb0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x38(%rbp), %rdx
callq 0x3f820
jmp 0x3f589
leaq -0x38(%rbp), %rdi
callq 0x11360
leaq -0x39(%rbp), %rdi
callq 0x11600
jmp 0x3f805
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3f5c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x11360
leaq -0x39(%rbp), %rdi
callq 0x11600
jmp 0x3f815
movq -0xb0(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x44bf0
leaq -0x60(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x3f5f7
jmp 0x3f747
movq -0xb0(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
je 0x3f72e
movq -0xb0(%rbp), %rax
movl 0xd0(%rax), %eax
movl %eax, -0xcc(%rbp)
subl $-0x38, %eax
je 0x3f691
jmp 0x3f625
movl -0xcc(%rbp), %eax
subl $-0x37, %eax
je 0x3f646
jmp 0x3f632
movl -0xcc(%rbp), %eax
subl $-0x4, %eax
je 0x3f6c2
jmp 0x3f6f4
movq -0xb0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rdx
movb $0x1, -0x61(%rbp)
leaq -0x60(%rbp), %rcx
leaq -0x61(%rbp), %r8
callq 0x47020
jmp 0x3f66b
movl $0x1, -0x68(%rbp)
jmp 0x3f74e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x24b20
jmp 0x3f815
movq -0xb0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rdx
movb $0x0, -0x69(%rbp)
leaq -0x60(%rbp), %rcx
leaq -0x69(%rbp), %r8
callq 0x47020
jmp 0x3f6b6
movl $0x1, -0x68(%rbp)
jmp 0x3f74e
movq -0xb0(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rcx
callq 0x47340
jmp 0x3f6dc
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x577a0
leaq -0x80(%rbp), %rdi
callq 0x24b20
jmp 0x3f6f6
jmp 0x3f6f6
movq -0xb0(%rbp), %rax
cmpl $0x3f, 0xd0(%rax)
jne 0x3f72c
movq -0xb0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x60(%rbp), %rcx
callq 0x4f2a0
jmp 0x3f723
movl $0x1, -0x68(%rbp)
jmp 0x3f74e
jmp 0x3f72e
movq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x58f90
movl $0x1, -0x68(%rbp)
jmp 0x3f74e
movl $0x0, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x24b20
movl -0x68(%rbp), %eax
testl %eax, %eax
je 0x3f765
jmp 0x3f760
jmp 0x3f805
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x119d0
movq -0xd8(%rbp), %rdx
leaq 0x111aa0(%rip), %rsi    # 0x151226
leaq -0xa0(%rbp), %rdi
callq 0x24740
jmp 0x3f794
movq -0xb0(%rbp), %rsi
movq -0xc0(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0xa0(%rbp), %rdx
callq 0x3f820
jmp 0x3f7b7
leaq -0xa0(%rbp), %rdi
callq 0x11360
leaq -0xa1(%rbp), %rdi
callq 0x11600
jmp 0x3f805
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x3f7f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x11360
leaq -0xa1(%rbp), %rdi
callq 0x11600
jmp 0x3f815
movq -0xb8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x119c0
nop