// File: Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseNPLambdaNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*)
ptr_node_t node_parser_t::parseNPLambdaNode(std::vector<node_scope_t> *scopes)
{
	nextToken();

	signature_t sig;
	std::vector<std::pair<bool, hash_ull>> p;
	std::vector<hash_ull> c;

	scopes->push_back({ROSSA_HASH("<LM2@" + std::to_string(scope_i++) + ">")});
	if (currentToken.type != '{')
	{
		auto body = parseEquNode(scopes);

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

		scopes->pop_back();
		return std::make_shared<DefineNode>(*scopes, 0, sig, p, body, c, 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();

		scopes->pop_back();
		auto body = std::make_shared<VectorNode>(*scopes, vbody, true, currentToken);
		return std::make_shared<DefineNode>(*scopes, 0, sig, p, body, c, currentToken);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq %rdi, -0x288(%rbp)
movq %rdi, %rax
movq %rax, -0x280(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x38fd0
leaq -0x30(%rbp), %rdi
callq 0x838a0
leaq -0x48(%rbp), %rdi
callq 0x38310
leaq -0x60(%rbp), %rdi
callq 0x2ccf0
movq -0x278(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, -0x270(%rbp)
leaq -0x80(%rbp), %rcx
movq %rcx, -0x268(%rbp)
movq (%rax), %rsi
movq %rsi, %rcx
incq %rcx
movq %rcx, (%rax)
leaq -0xe0(%rbp), %rdi
callq 0x58780
jmp 0x464ca
leaq 0x10ad8d(%rip), %rsi    # 0x15125e
leaq -0xc0(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0x24cb0
jmp 0x464e6
leaq 0x109e73(%rip), %rdx    # 0x150360
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x24c60
jmp 0x46502
leaq 0x19f58f(%rip), %rdi    # 0x1e5a98
leaq -0xa0(%rbp), %rsi
callq 0x2cb10
movq %rax, -0x290(%rbp)
jmp 0x4651e
movq -0x268(%rbp), %rax
movq -0x290(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x78(%rbp), %rdi
xorps %xmm0, %xmm0
movups %xmm0, -0x78(%rbp)
movq $0x0, -0x68(%rbp)
callq 0x2ccf0
movq -0x270(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2ccc0
jmp 0x46559
leaq -0x80(%rbp), %rdi
callq 0x2cd10
leaq -0xa0(%rbp), %rdi
callq 0x11360
leaq -0xc0(%rbp), %rdi
callq 0x11360
leaq -0xe0(%rbp), %rdi
callq 0x11360
movq -0x278(%rbp), %rax
cmpl $0x7b, 0xd0(%rax)
je 0x467cf
movq -0x278(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x3f500
jmp 0x465b3
leaq -0x100(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x4671a
leaq -0x121(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x119d0
movq -0x298(%rbp), %rdx
leaq 0x10ac3e(%rip), %rsi    # 0x151226
leaq -0x120(%rbp), %rdi
callq 0x24740
jmp 0x465f6
movq -0x278(%rbp), %rsi
movq -0x288(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x120(%rbp), %rdx
callq 0x3f820
jmp 0x46619
leaq -0x120(%rbp), %rdi
callq 0x11360
leaq -0x121(%rbp), %rdi
callq 0x11600
movl $0x1, -0x128(%rbp)
jmp 0x467ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46dd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x466c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x466ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x466ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x2cd10
leaq -0xa0(%rbp), %rdi
callq 0x11360
leaq -0xc0(%rbp), %rdi
callq 0x11360
leaq -0xe0(%rbp), %rdi
callq 0x11360
jmp 0x46dd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46709
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x11360
leaq -0x121(%rbp), %rdi
callq 0x11600
jmp 0x467be
movq -0x18(%rbp), %rdi
callq 0x58270
movq -0x278(%rbp), %rcx
movq -0x18(%rbp), %rsi
movl $0x0, -0x13c(%rbp)
addq $0x58, %rcx
movq %rsp, %rax
movq %rcx, 0x8(%rax)
leaq -0x60(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x138(%rbp), %rdi
leaq -0x13c(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %r8
leaq -0x100(%rbp), %r9
callq 0x58900
jmp 0x4676e
movq -0x288(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x58440
leaq -0x138(%rbp), %rdi
callq 0x58470
movl $0x1, -0x128(%rbp)
jmp 0x467ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x467be
leaq -0x100(%rbp), %rdi
callq 0x24b20
jmp 0x46dad
leaq -0x100(%rbp), %rdi
callq 0x24b20
jmp 0x46dd8
leaq -0x158(%rbp), %rdi
callq 0x57390
movq -0x278(%rbp), %rdi
callq 0x38fd0
jmp 0x467e9
jmp 0x467eb
movq -0x278(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
je 0x46989
movq -0x278(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
je 0x4681f
movq -0x278(%rbp), %rax
cmpl $0x7d, 0xd0(%rax)
jne 0x4683b
jmp 0x46989
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46d9f
movq -0x278(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x168(%rbp), %rdi
callq 0x39980
jmp 0x46854
leaq -0x168(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x46866
jmp 0x46897
leaq -0x158(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x57650
jmp 0x4687b
jmp 0x4694d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46978
leaq -0x189(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x119d0
movq -0x2a0(%rbp), %rdx
leaq 0x10a96e(%rip), %rsi    # 0x151226
leaq -0x188(%rbp), %rdi
callq 0x24740
jmp 0x468c6
movq -0x278(%rbp), %rsi
movq -0x288(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x188(%rbp), %rdx
callq 0x3f820
jmp 0x468e9
leaq -0x188(%rbp), %rdi
callq 0x11360
leaq -0x189(%rbp), %rdi
callq 0x11600
movl $0x1, -0x128(%rbp)
jmp 0x46957
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x4693f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x11360
leaq -0x189(%rbp), %rdi
callq 0x11600
jmp 0x46978
movl $0x0, -0x128(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x24b20
movl -0x128(%rbp), %eax
testl %eax, %eax
jne 0x46d91
jmp 0x46973
jmp 0x467eb
leaq -0x168(%rbp), %rdi
callq 0x24b20
jmp 0x46d9f
movq -0x278(%rbp), %rax
cmpl $0x7d, 0xd0(%rax)
je 0x46ca6
leaq -0x1d1(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
callq 0x119d0
movq -0x2a8(%rbp), %rdx
leaq 0x10a7d2(%rip), %rsi    # 0x151190
leaq -0x1d0(%rbp), %rdi
callq 0x24740
jmp 0x469cc
movb $0x1, -0x22a(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x2b8(%rbp)
movq %rax, -0x228(%rbp)
leaq -0x229(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x119d0
movq -0x2b8(%rbp), %rdi
movq -0x2b0(%rbp), %rdx
leaq 0x10e8f9(%rip), %rsi    # 0x155309
callq 0x24740
jmp 0x46a17
movb $0x0, -0x22a(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x200(%rbp)
movq $0x1, -0x1f8(%rbp)
leaq -0x22b(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x26e30
movq -0x2c0(%rbp), %rcx
movq -0x200(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
leaq -0x1f0(%rbp), %rdi
callq 0x2d6a0
jmp 0x46a6d
leaq -0x1b0(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
leaq -0x1f0(%rbp), %rdx
callq 0x9e250
jmp 0x46a89
movq -0x278(%rbp), %rsi
movq -0x288(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0x1b0(%rbp), %rdx
callq 0x3f820
jmp 0x46aac
leaq -0x1b0(%rbp), %rdi
callq 0x11360
leaq -0x1f0(%rbp), %rdi
callq 0x25b00
leaq -0x22b(%rbp), %rdi
callq 0x279c0
leaq -0x220(%rbp), %rax
movq %rax, -0x2d0(%rbp)
addq $0x20, %rax
movq %rax, -0x2c8(%rbp)
movq -0x2c8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x11360
movq -0x2d0(%rbp), %rcx
movq -0x2d8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2c8(%rbp)
jne 0x46ae9
leaq -0x229(%rbp), %rdi
callq 0x11600
leaq -0x1d0(%rbp), %rdi
callq 0x11360
leaq -0x1d1(%rbp), %rdi
callq 0x11600
movl $0x1, -0x128(%rbp)
jmp 0x46d91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46c95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46c25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46bcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
jmp 0x46bc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x11360
leaq -0x1f0(%rbp), %rdi
callq 0x25b00
leaq -0x22b(%rbp), %rdi
callq 0x279c0
leaq -0x220(%rbp), %rax
movq %rax, -0x2e8(%rbp)
addq $0x20, %rax
movq %rax, -0x2e0(%rbp)
movq -0x2e0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x11360
movq -0x2e8(%rbp), %rcx
movq -0x2f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2e0(%rbp)
jne 0x46bf2
jmp 0x46c25
leaq -0x229(%rbp), %rdi
callq 0x11600
testb $0x1, -0x22a(%rbp)
jne 0x46c3c
jmp 0x46c89
movq -0x228(%rbp), %rax
leaq -0x220(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x2f8(%rbp)
je 0x46c87
movq -0x2f8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x300(%rbp)
callq 0x11360
movq -0x300(%rbp), %rax
leaq -0x220(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x2f8(%rbp)
jne 0x46c56
jmp 0x46c89
leaq -0x1d0(%rbp), %rdi
callq 0x11360
leaq -0x1d1(%rbp), %rdi
callq 0x11600
jmp 0x46d9f
movq -0x278(%rbp), %rdi
callq 0x38fd0
jmp 0x46cb4
movq -0x18(%rbp), %rdi
callq 0x58270
movq -0x278(%rbp), %r8
movq -0x18(%rbp), %rsi
movb $0x1, -0x241(%rbp)
addq $0x58, %r8
leaq -0x240(%rbp), %rdi
leaq -0x158(%rbp), %rdx
leaq -0x241(%rbp), %rcx
callq 0x573e0
jmp 0x46cef
movq -0x278(%rbp), %rcx
movq -0x18(%rbp), %rsi
movl $0x0, -0x25c(%rbp)
addq $0x58, %rcx
movq %rsp, %rax
movq %rcx, 0x8(%rax)
leaq -0x60(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x258(%rbp), %rdi
leaq -0x25c(%rbp), %rdx
leaq -0x30(%rbp), %rcx
leaq -0x48(%rbp), %r8
leaq -0x240(%rbp), %r9
callq 0x58a50
jmp 0x46d3a
movq -0x288(%rbp), %rdi
leaq -0x258(%rbp), %rsi
callq 0x58440
leaq -0x258(%rbp), %rdi
callq 0x58470
movl $0x1, -0x128(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x574a0
jmp 0x46d91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x240(%rbp), %rdi
callq 0x574a0
jmp 0x46d9f
leaq -0x158(%rbp), %rdi
callq 0x574c0
jmp 0x46dad
leaq -0x158(%rbp), %rdi
callq 0x574c0
jmp 0x46dd8
leaq -0x60(%rbp), %rdi
callq 0x2ce90
leaq -0x48(%rbp), %rdi
callq 0x2a500
leaq -0x30(%rbp), %rdi
callq 0x57fb0
movq -0x280(%rbp), %rax
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0x2ce90
leaq -0x48(%rbp), %rdi
callq 0x2a500
leaq -0x30(%rbp), %rdi
callq 0x57fb0
movq -0xe8(%rbp), %rdi
callq 0x119c0
nop