// File: kram[P]kram/./src/parser/parser.cpp
// Function: Parser::oper_list_creation()
Instruction* Parser::oper_list_creation() {
	Instruction* ins = new Instruction(Ins::LIST_CREATE);

	// Get all peices (seperated by commas)
	do {
		ins->right = this->read_until(std::vector<lexer::Token>{
			lexer::Token::OPERATOR("]"),
			lexer::Token::OPERATOR(","),
		}, ins->right);
	} while (this->get_token()->sub == lexer::Type::OPERATOR_COMMA);

	return ins;
}

// Assembly:
subq $0x198, %rsp            # imm = 0x198
movq %rdi, 0x190(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x68(%rsp)
movl $0x80, %edi
callq 0x32e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x70(%rsp)
movl $0xe, %esi
callq 0x26dd0
jmp 0x231dd
movq 0x70(%rsp), %rax
movq %rax, 0x188(%rsp)
movb $0x1, 0x96(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x34a0
movq 0x60(%rsp), %rdx
leaq 0x8097(%rip), %rsi      # 0x2b2b7
leaq 0xc0(%rsp), %rdi
callq 0x3390
jmp 0x2322f
leaq 0xe8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0xd7e0
jmp 0x23246
leaq 0x110(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rax, 0xe0(%rsp)
leaq 0x97(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x34a0
movq 0x58(%rsp), %rdx
leaq 0x800d(%rip), %rsi      # 0x2b286
leaq 0x98(%rsp), %rdi
callq 0x3390
jmp 0x23288
movq 0x50(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xd7e0
jmp 0x2329c
movb $0x0, 0x96(%rsp)
leaq 0xe8(%rsp), %rax
movq %rax, 0x138(%rsp)
movq $0x2, 0x140(%rsp)
leaq 0x95(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x26940
movq 0x48(%rsp), %rcx
movq 0x138(%rsp), %rsi
movq 0x140(%rsp), %rdx
leaq 0x148(%rsp), %rdi
callq 0x26950
jmp 0x232f6
movq 0x188(%rsp), %rsi
addq $0x50, %rsi
leaq 0x78(%rsp), %rdi
callq 0x5460
jmp 0x2330e
movq 0x68(%rsp), %rsi
leaq 0x160(%rsp), %rdi
leaq 0x148(%rsp), %rdx
leaq 0x78(%rsp), %rcx
callq 0x21120
jmp 0x2332f
movq 0x188(%rsp), %rdi
addq $0x50, %rdi
leaq 0x160(%rsp), %rsi
callq 0x26e30
leaq 0x160(%rsp), %rdi
callq 0x5560
leaq 0x78(%rsp), %rdi
callq 0x5560
leaq 0x148(%rsp), %rdi
callq 0x269e0
leaq 0x95(%rsp), %rdi
callq 0x26a40
leaq 0xe8(%rsp), %rax
movq %rax, 0x38(%rsp)
addq $0x50, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
addq $-0x28, %rdi
movq %rdi, 0x30(%rsp)
callq 0xdeb0
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x40(%rsp)
jne 0x2338f
leaq 0x98(%rsp), %rdi
callq 0x31f0
leaq 0x97(%rsp), %rdi
callq 0x3310
leaq 0xc0(%rsp), %rdi
callq 0x31f0
leaq 0xbf(%rsp), %rdi
callq 0x3310
movq 0x68(%rsp), %rdi
callq 0x21200
cmpl $0x12, 0x4(%rax)
je 0x231ea
movq 0x188(%rsp), %rax
addq $0x198, %rsp            # imm = 0x198
retq
movq 0x70(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
callq 0x32b0
jmp 0x235c0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x2355f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x23552
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x23545
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x23538
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x234ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
jmp 0x234df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x180(%rsp)
movl %eax, 0x17c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x5560
leaq 0x148(%rsp), %rdi
callq 0x269e0
leaq 0x95(%rsp), %rdi
callq 0x26a40
leaq 0xe8(%rsp), %rax
movq %rax, 0x20(%rsp)
addq $0x50, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
addq $-0x28, %rdi
movq %rdi, 0x18(%rsp)
callq 0xdeb0
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
cmpq %rcx, %rax
movq %rax, 0x28(%rsp)
jne 0x2350f
jmp 0x23538
leaq 0x98(%rsp), %rdi
callq 0x31f0
leaq 0x97(%rsp), %rdi
callq 0x3310
leaq 0xc0(%rsp), %rdi
callq 0x31f0
leaq 0xbf(%rsp), %rdi
callq 0x3310
testb $0x1, 0x96(%rsp)
jne 0x23578
jmp 0x235be
movq 0xe0(%rsp), %rax
leaq 0xe8(%rsp), %rcx
cmpq %rax, %rcx
movq %rax, 0x10(%rsp)
je 0x235bc
movq 0x10(%rsp), %rdi
addq $-0x28, %rdi
movq %rdi, 0x8(%rsp)
callq 0xdeb0
movq 0x8(%rsp), %rax
leaq 0xe8(%rsp), %rcx
cmpq %rcx, %rax
movq %rax, 0x10(%rsp)
jne 0x23592
jmp 0x235be
jmp 0x235c0
movq 0x180(%rsp), %rdi
callq 0x3490
nopl (%rax)