// File: /workspace/github_cpp_makefile_star2_O3/Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseLambdaNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseLambdaNode(std::vector<node_scope_t> *scopes)
{
	nextToken();
	scopes->push_back({ROSSA_HASH("<LAM@" + std::to_string(scope_i++) + ">")});

	bool isVargs = false;
	auto sig = parseSigNode(scopes);
	if (!sig.second.empty() && sig.second[0].first == 1 && sig.second[0].second == 0)
		isVargs = true;

	int i = 0;
	std::vector<hash_ull> captures;
	if (currentToken.type == '[')
	{
		nextToken();
		while (currentToken.type != ']')
		{
			if (i++ > 0)
			{
				if (currentToken.type != ',')
					return logErrorN(util::format(_EXPECTED_ERROR_, {","}), currentToken);
				nextToken();
			}

			std::string arg;

			if (currentToken.type == TOK_IDF)
				arg = currentToken.valueString;
			else
				return logErrorN("Expected variable identifier", currentToken);
			nextToken();

			captures.push_back(ROSSA_HASH(arg));
		}
		nextToken();
	}

	if (currentToken.type != '{')
	{
		auto body = parseEquNode(scopes);

		if (!body)
			return logErrorN(_FAILURE_PARSE_CODE_, currentToken);

		scopes->pop_back();
		if (isVargs)
			return std::make_shared<VargDefineNode>(*scopes, 0, body, captures, currentToken);
		else
			return std::make_shared<DefineNode>(*scopes, 0, sig.first, sig.second, body, captures, currentToken);
	}
	else
	{
		std::vector<ptr_node_t> vbody;

		nextToken();
		while (currentToken.type != NULL_TOK)
		{
			if (currentToken.type == NULL_TOK || currentToken.type == '}')
				break;

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

		auto body = std::make_shared<VectorNode>(*scopes, vbody, true, currentToken);

		scopes->pop_back();
		if (isVargs)
			return std::make_shared<VargDefineNode>(*scopes, 0, body, captures, currentToken);
		else
			return std::make_shared<DefineNode>(*scopes, 0, sig.first, sig.second, body, captures, currentToken);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x2549e
movq (%r14), %rbx
leaq 0x1(%rbx), %rax
movq %rax, (%r14)
movl $0x1, %esi
cmpq $0xa, %rbx
jb 0x2c7e4
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %rbx, %rcx
cmpq $0x63, %rcx
jbe 0x2c7dd
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0x2c7e2
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0x2c7e4
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0x2c7a7
addl $-0x3, %esi
jmp 0x2c7e4
addl $-0x2, %esi
jmp 0x2c7e4
decl %esi
movq %r12, 0x58(%rsp)
movl %esi, %esi
leaq 0x70(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x104c0
movq (%r12), %rdi
movl 0x8(%r12), %esi
movq %rbx, %rdx
callq 0x376dd
leaq 0x57130(%rip), %rcx     # 0x8394b
movl $0x5, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10460
leaq 0x30(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2c854
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x2c85a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x56aab(%rip), %rsi     # 0x83328
callq 0x10770
leaq 0x10(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2c8a8
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2c8ae
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x89029(%rip), %r13     # 0xb58f8
movq (%r13), %rdi
movq 0x8(%r13), %rsi
callq 0x20d1b
movq 0x8(%r13), %rsi
cmpq %rsi, %rax
je 0x2c8fd
movq (%r13), %rbx
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x20d1b
subq %rbx, %rax
sarq $0x5, %rax
jmp 0x2c91d
leaq 0x88ff4(%rip), %rbx     # 0xb58f8
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x20cde
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
decq %rax
leaq 0xb8(%rsp), %rsi
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movq $0x0, 0x18(%rsi)
movq 0x58(%rsp), %rdi
callq 0x216b8
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x2c95e
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2c979
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2c995
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2c9ac
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq 0x58(%rsp), %rdx
callq 0x2aaec
movq 0x18(%rbx), %rax
cmpq 0x20(%rbx), %rax
je 0x2c9e1
cmpb $0x1, (%rax)
jne 0x2c9e1
cmpq $0x0, 0x8(%rax)
sete %al
movl %eax, 0x44(%rsp)
jmp 0x2c9e9
movl $0x0, 0x44(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
leaq 0x58(%r14), %rax
movq %rax, 0x48(%rsp)
movl 0xd0(%r14), %eax
cmpl $0x5b, %eax
jne 0x2cb63
movq %r15, 0xe8(%rsp)
movq %r14, %rdi
callq 0x2549e
movl 0xd0(%r14), %eax
cmpl $0x5d, %eax
je 0x2cb47
leaq 0xb0(%r14), %rbp
xorl %r15d, %r15d
movq %rsp, %rbx
subl $0x1, %r15d
jb 0x2ca64
cmpl $0x2c, %eax
jne 0x2cf59
movq %r14, %rdi
callq 0x2549e
movl 0xd0(%r14), %eax
leaq 0x10(%rsp), %rcx
movq %rcx, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
cmpl $-0x2, %eax
jne 0x2cf27
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x10210
movq %r14, %rdi
callq 0x2549e
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movq %rbx, %rdx
callq 0x20d1b
movq 0x8(%r13), %rsi
cmpq %rsi, %rax
je 0x2cac8
movq (%r13), %r12
movq %r12, %rdi
movq %rbx, %rdx
callq 0x20d1b
subq %r12, %rax
sarq $0x5, %rax
jmp 0x2cae2
movq %r13, %rdi
movq %rbx, %rsi
callq 0x20cde
movq 0x8(%r13), %rax
subq (%r13), %rax
sarq $0x5, %rax
decq %rax
movq %rax, 0x20(%rsp)
movq 0x88(%rsp), %rsi
cmpq 0x90(%rsp), %rsi
je 0x2cb0a
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x88(%rsp)
jmp 0x2cb1c
leaq 0x80(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x391c8
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2cb37
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
movl 0xd0(%r14), %eax
cmpl $0x5d, %eax
jne 0x2ca46
movq %r14, %rdi
callq 0x2549e
movl 0xd0(%r14), %eax
movq 0xe8(%rsp), %r15
leaq 0x70(%rsp), %rbp
leaq 0xd0(%rsp), %r13
cmpl $0x7b, %eax
jne 0x2cbec
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq %r14, %rdi
callq 0x2549e
leaq 0x20(%rsp), %rbx
leaq 0xa0(%rsp), %r12
movl 0xd0(%r14), %eax
cmpl $0x7d, %eax
je 0x2cc87
testl %eax, %eax
je 0x2ce6e
movq %rbx, %rdi
movq %r14, %rsi
movq 0x58(%rsp), %rdx
callq 0x25dc8
cmpq $0x0, 0x20(%rsp)
je 0x2cef9
movq %r12, %rdi
movq %rbx, %rsi
callq 0x36d3e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2cb9c
callq 0x1e5bc
jmp 0x2cb9c
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq 0x58(%rsp), %r12
movq %r12, %rdx
callq 0x2946a
cmpq $0x0, 0x20(%rsp)
movq 0x48(%rsp), %rbp
je 0x2cfe9
movq 0x8(%r12), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r12)
movq -0x18(%rax), %rdi
testq %rdi, %rdi
je 0x2cc38
movq -0x8(%rax), %rsi
subq %rdi, %rsi
callq 0x103d0
cmpb $0x0, 0x44(%rsp)
je 0x2cd47
leaq 0x60(%rsp), %r8
movl $0x0, (%r8)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x80(%rsp), %rax
movq %rsp, %rsi
leaq 0xa0(%rsp), %rdx
leaq 0x20(%rsp), %r9
movq %r12, %rcx
pushq %rbp
pushq %rax
callq 0x39b26
addq $0x10, %rsp
jmp 0x2cd8c
movq %r14, %rdi
callq 0x2549e
leaq 0x60(%rsp), %r9
movb $0x1, (%r9)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x8(%rsp), %rbx
leaq 0x28(%rsp), %rdx
leaq 0xa8(%rsp), %r8
movq %rbx, %rsi
movq 0x60(%rsp), %r14
movq %r14, %rcx
movq 0x50(%rsp), %r12
pushq %r12
callq 0x37f5a
addq $0x10, %rsp
movq 0x8(%r14), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r14)
movq -0x18(%rax), %rdi
testq %rdi, %rdi
je 0x2ccf7
movq -0x8(%rax), %rsi
subq %rdi, %rsi
callq 0x103d0
cmpb $0x0, 0x44(%rsp)
je 0x2cda5
leaq 0x60(%rsp), %r8
movl $0x0, (%r8)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x80(%rsp), %rax
leaq 0x20(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
movq %rsp, %r9
movq %r14, %rcx
pushq %r12
pushq %rax
callq 0x39c7a
addq $0x10, %rsp
jmp 0x2cded
leaq 0x60(%rsp), %r8
movl $0x0, (%r8)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x80(%rsp), %rax
movq %rsp, %rsi
leaq 0xa0(%rsp), %rdx
leaq 0xb8(%rsp), %r9
movq %r12, %rcx
pushq %rbp
pushq %rax
pushq %rbx
pushq %r13
callq 0x39bcc
addq $0x20, %rsp
movaps (%rsp), %xmm0
movups %xmm0, (%r15)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2ce12
callq 0x1e5bc
jmp 0x2ce12
leaq 0x60(%rsp), %r8
movl $0x0, (%r8)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x80(%rsp), %rax
leaq 0x20(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
leaq 0xb8(%rsp), %r9
movq %r14, %rcx
pushq %r12
pushq %rax
pushq %rbx
pushq %r13
callq 0x39daa
addq $0x20, %rsp
movaps 0x20(%rsp), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2ce05
callq 0x1e5bc
leaq 0xa0(%rsp), %rdi
callq 0x36cf0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x2ce2f
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x2ce4c
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
leaq 0xb8(%rsp), %rdi
callq 0x36f28
movq %r15, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, 0x30(%rsp)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x36(%rsp)
movq $0xe, 0x28(%rsp)
movb $0x0, 0x3e(%rsp)
leaq 0x60(%rsp), %rsi
movq %rbp, %r15
movq %rbp, (%rsi)
movw $0x7d, 0x10(%rsi)
movq $0x1, 0x8(%rsi)
leaq 0xf0(%rsp), %rdi
leaq 0x57(%rsp), %rcx
movl $0x1, %edx
callq 0x20b38
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x47db4
movq %rsp, %rdx
movq %r14, %rsi
movq 0x48(%rsp), %rcx
callq 0x29658
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x56a0e(%rip), %rsi     # 0x83919
leaq 0x56a1c(%rip), %rdx     # 0x8392e
callq 0x1e698
movq %rsp, %rdx
movq %r14, %rsi
movq 0x48(%rsp), %rcx
callq 0x29658
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, (%rdi)
leaq 0x569aa(%rip), %rsi     # 0x838e5
leaq 0x569bf(%rip), %rdx     # 0x83901
callq 0x1e698
leaq 0x20(%rsp), %rdx
movq %r14, %rsi
movq 0x48(%rsp), %rcx
callq 0x29658
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movabsq $0x6465746365707845, %rax # imm = 0x6465746365707845
movq %rax, 0x30(%rsp)
movabsq $0x607d307b60206465, %rax # imm = 0x607D307B60206465
movq %rax, 0x36(%rsp)
movq $0xe, 0x28(%rsp)
movb $0x0, 0x3e(%rsp)
leaq 0x60(%rsp), %rsi
leaq 0x70(%rsp), %rax
movq %rax, (%rsi)
movw $0x2c, 0x10(%rsi)
movq $0x1, 0x8(%rsi)
leaq 0xa0(%rsp), %rdi
leaq 0xf0(%rsp), %rcx
movl $0x1, %edx
callq 0x20b38
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x47db4
movq %rsp, %rdx
movq %r14, %rsi
movq 0x48(%rsp), %rcx
callq 0x29658
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x5691e(%rip), %rsi     # 0x83919
leaq 0x5692c(%rip), %rdx     # 0x8392e
callq 0x1e698
movq %rsp, %rdx
movq %r14, %rsi
movq 0x48(%rsp), %rcx
callq 0x29658
jmp 0x2d019
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2d24e
jmp 0x2d244
jmp 0x2d053
jmp 0x2d053
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2d056
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d056
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2d27d
callq 0x1e5bc
jmp 0x2d27d
jmp 0x2d24b
jmp 0x2d1a8
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2d09b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d09b
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x1db60
jmp 0x2d0e3
jmp 0x2d24b
jmp 0x2d1a8
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x2d11f
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
jmp 0x2d11f
movq %rax, %rbx
jmp 0x2d13a
movq %rax, %rbx
jmp 0x2d156
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x2d0ff
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d27d
movq 0x30(%rsp), %rsi
jmp 0x2d275
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2d13a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d156
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2d2a7
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d2a7
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2d199
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d199
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x1db60
jmp 0x2d202
movq %rax, %rbx
jmp 0x2d27d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d262
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d262
jmp 0x2d25f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2d23a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d23a
jmp 0x2d237
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r15, %rdi
je 0x2d219
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d24e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x2d24e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2d24e
callq 0x1e5bc
jmp 0x2d24e
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x36cf0
jmp 0x2d27d
jmp 0x2d25f
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x2d27d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x2d29a
movq 0x90(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
leaq 0xb8(%rsp), %rdi
callq 0x36f98
movq %rbx, %rdi
callq 0x106f0
nop