// File: Nallantli[P]Rossa/main/rossa/node_parser/node_parser.cpp
// Function: node_parser_t::parseIndexNode(std::vector<node_scope_t, std::allocator<node_scope_t>>*, std::shared_ptr<Node> const&)
ptr_node_t node_parser_t::parseIndexNode(std::vector<node_scope_t> *scopes, const ptr_node_t &a)
{
	auto marker = tokens.at(index - 2);
	nextToken();
	if (auto b = parseEquNode(scopes))
	{
		if (currentToken.type != ']')
			return logErrorN(util::format(_EXPECTED_ERROR_, {"]"}), currentToken);
		nextToken();
		auto ret = std::make_shared<BinOpNode>(*scopes, "[]", a, b, marker);
		return parseTrailingNode(scopes, ret, true);
	}
	return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x1a0(%rbp)
movq %rdi, %rax
movq %rax, -0x198(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x190(%rbp)
movq %rax, %rdi
addq $0x10, %rdi
movl 0x50(%rax), %eax
addl $-0x2, %eax
movl %eax, %esi
callq 0x56f60
movq %rax, %rsi
leaq -0xa0(%rbp), %rdi
callq 0x2ee00
movq -0x190(%rbp), %rdi
callq 0x38fd0
jmp 0x3e978
movq -0x190(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0xc0(%rbp), %rdi
callq 0x3f500
jmp 0x3e991
leaq -0xc0(%rbp), %rdi
callq 0x57630
testb $0x1, %al
jne 0x3e9a6
jmp 0x3edcd
movq -0x190(%rbp), %rax
cmpl $0x5d, 0xd0(%rax)
je 0x3ecda
leaq -0x101(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x119d0
movq -0x1a8(%rbp), %rdx
leaq 0x1127b5(%rip), %rsi    # 0x151190
leaq -0x100(%rbp), %rdi
callq 0x24740
jmp 0x3e9e9
movb $0x1, -0x15a(%rbp)
leaq -0x150(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movq %rax, -0x158(%rbp)
leaq -0x159(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x119d0
movq -0x1b8(%rbp), %rdi
movq -0x1b0(%rbp), %rdx
leaq 0x1115d8(%rip), %rsi    # 0x150005
callq 0x24740
jmp 0x3ea34
movb $0x0, -0x15a(%rbp)
leaq -0x150(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x1, -0x128(%rbp)
leaq -0x15b(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x26e30
movq -0x1c0(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x2d6a0
jmp 0x3ea8a
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0x120(%rbp), %rdx
callq 0x9e250
jmp 0x3eaa6
movq -0x190(%rbp), %rsi
movq -0x1a0(%rbp), %rdi
movq %rsi, %rcx
addq $0x58, %rcx
leaq -0xe0(%rbp), %rdx
callq 0x3f820
jmp 0x3eac9
leaq -0xe0(%rbp), %rdi
callq 0x11360
leaq -0x120(%rbp), %rdi
callq 0x25b00
leaq -0x15b(%rbp), %rdi
callq 0x279c0
leaq -0x150(%rbp), %rax
movq %rax, -0x1d0(%rbp)
addq $0x20, %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x11360
movq -0x1d0(%rbp), %rcx
movq -0x1d8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1c8(%rbp)
jne 0x3eb06
leaq -0x159(%rbp), %rdi
callq 0x11600
leaq -0x100(%rbp), %rdi
callq 0x11360
leaq -0x101(%rbp), %rdi
callq 0x11600
movl $0x1, -0x160(%rbp)
jmp 0x3edd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3ee35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3ecc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3ec59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3ec01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3ebf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x11360
leaq -0x120(%rbp), %rdi
callq 0x25b00
leaq -0x15b(%rbp), %rdi
callq 0x279c0
leaq -0x150(%rbp), %rax
movq %rax, -0x1e8(%rbp)
addq $0x20, %rax
movq %rax, -0x1e0(%rbp)
movq -0x1e0(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x11360
movq -0x1e8(%rbp), %rcx
movq -0x1f0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1e0(%rbp)
jne 0x3ec26
jmp 0x3ec59
leaq -0x159(%rbp), %rdi
callq 0x11600
testb $0x1, -0x15a(%rbp)
jne 0x3ec70
jmp 0x3ecbd
movq -0x158(%rbp), %rax
leaq -0x150(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1f8(%rbp)
je 0x3ecbb
movq -0x1f8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x200(%rbp)
callq 0x11360
movq -0x200(%rbp), %rax
leaq -0x150(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1f8(%rbp)
jne 0x3ec8a
jmp 0x3ecbd
leaq -0x100(%rbp), %rdi
callq 0x11360
leaq -0x101(%rbp), %rdi
callq 0x11600
jmp 0x3ee0b
movq -0x190(%rbp), %rdi
callq 0x38fd0
jmp 0x3ece8
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rcx
leaq 0x11130d(%rip), %rdx    # 0x150004
leaq -0x170(%rbp), %rdi
leaq -0xc0(%rbp), %r8
leaq -0xa0(%rbp), %r9
callq 0x58b00
jmp 0x3ed13
movq -0x18(%rbp), %rax
movq %rax, -0x210(%rbp)
leaq -0x180(%rbp), %rdi
movq %rdi, -0x208(%rbp)
leaq -0x170(%rbp), %rsi
callq 0x58ba0
movq -0x1a0(%rbp), %rdi
movq -0x190(%rbp), %rsi
movq -0x210(%rbp), %rdx
movq -0x208(%rbp), %rcx
movb $0x1, -0x181(%rbp)
leaq -0x181(%rbp), %r8
callq 0x3d860
jmp 0x3ed69
leaq -0x180(%rbp), %rdi
callq 0x24b20
movl $0x1, -0x160(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x58bd0
jmp 0x3edd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
jmp 0x3ee0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x24b20
leaq -0x170(%rbp), %rdi
callq 0x58bd0
jmp 0x3ee0b
movl $0x0, -0x160(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x24b20
movl -0x160(%rbp), %eax
testl %eax, %eax
jne 0x3ee19
jmp 0x3edef
movq -0x1a0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x58bf0
movl $0x1, -0x160(%rbp)
jmp 0x3ee19
leaq -0xc0(%rbp), %rdi
callq 0x24b20
jmp 0x3ee35
leaq -0xa0(%rbp), %rdi
callq 0x2a480
movq -0x198(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
leaq -0xa0(%rbp), %rdi
callq 0x2a480
movq -0xa8(%rbp), %rdi
callq 0x119c0
nopl (%rax)